<%@ page language="java" contentType="text/html; charset=UTF-8"
		 pageEncoding="UTF-8" %>
<%String path = request.getContextPath();%>
<%@ taglib uri="/WEB-INF/tld/c.tld" prefix="c" %>
<%@ taglib uri="/WEB-INF/tld/ui.tld" prefix="ui" %>
<%--<%@taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>--%>

<!DOCTYPE html>
<html lang="zh-CN">
<head>
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="renderer" content="webkit">
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<title>挂靠公司详细信息</title>
	<jsp:include page="../../import.jsp" flush="true"/>
	<script type="text/javascript" src="<%=path %>/resource/lib/plugins/ajaxfileupload.js"></script>
</head>
<body class="iframeBody">
<div class="Wrapper">
	<div id="pageInTab" class="pageInTab">
		<div tabid="tabA" title="基本信息" id="tabAId">
			<form id="prj_lnk_comp_form" name="prj_lnk_comp_form">
				<div class="fieldset1 tabel_col clearFix">
					<div class="fieldBox col_50">
						<div class="label">公司名称</div>
						<div class="field">
							<input name="lnkCompNm" id="lnkCompNm" type="text"
								   class="ui-textbox" value="${prjLnkComp.lnkCompNm }"
								   validate="{required:true}"> <span
								class="requiredSymbol">*</span>
						</div>
					</div>
					<div class="fieldBox col_50">
						<div class="label">统一社会信用代码</div>
						<div class="field">
							<input name="succ" id="succ" type="text"
								   class="ui-textbox" value="${prjLnkComp.succ}"
								   validate="{required:true}"> <span
								class="requiredSymbol">*</span>
						</div>
					</div>
					<div class="fieldBox col_50">
						<div class="label">公司归属</div>
						<div class="field">
							<select name="ownerCd" id="ownerCd" validate="{required:true}">
								<c:forEach items="${keyValueList}" var="opt">
									<option value="${opt.key}"
											<c:if test="${opt.key==prjLnkComp.ownerCd }">selected="selected"</c:if>>${opt.value}</option>
								</c:forEach>
							</select> <span class="requiredSymbol">*</span>
						</div>
					</div>
					<div class="fieldBox col_50">
						<div class="label">所在地</div>
						<div class="field">
							<input name="officeAddr" id="officeAddr" type="text"
								   class="ui-textbox"
								   value="${prjLnkComp.officeAddr }" validate="{required:true}"> <span
								class="requiredSymbol">*</span>
						</div>
					</div>
					<div class="fieldBox col_50">
						<div class="label">主营项目类别</div>
						<div class="field">
							<input name="majorBiz" id="majorBiz" type="text"
								   class="ui-textbox" value="${prjLnkComp.majorBiz }">
						</div>
					</div>
					<div class="fieldBox col_50">
						<div class="label">企业类型</div>
						<div class="field">
							<input name="compTyp" id="compTyp" type="text"
								   class="ui-textbox" value="${prjLnkComp.compTyp }">
						</div>
					</div>
					<%--<div class="fieldBox col_50">
                        <div class="label">营业执照注册号</div>
                        <div class="field">
                            <input name="bizLicNo" id="bizLicNo" type="text"
                                class="ui-textbox" value="${compApplyVO.bizLicNo }"
                                validate="{required:true}"> <span
                                class="requiredSymbol" isShow="isother">*</span>
                        </div>
                    </div>--%>
					<div class="fieldBox col_50">
						<div class="label">注册地址</div>
						<div class="field">
							<input name="regAddr" id="regAddr" type="text"
								   class="ui-textbox" value="${prjLnkComp.regAddr }" validate="{required:true}">
								   <span
								class="requiredSymbol">*</span>
						</div>
					</div>
					<div class="fieldBox col_50">
						<div class="label">成立日期</div>
						<div class="field">
							<input name="regDt" id="regDt" type="text" isShow="iscar"
								   class="ui-datepicker" value="${prjLnkComp.regDtStr }" validate="{required:true}"> <span
								class="requiredSymbol">*</span>
						</div>
					</div>
					<div class="fieldBox col_50">
						<div class="label">道路运输许可证有效期</div>
						<div class="field">
							<input name="expDt" id="expDt" type="text"
								   class="ui-datepicker" value="${prjLnkComp.expDtStr }">
						</div>
					</div>
					<div class="fieldBox col_50">
						<div class="label">经营范围</div>
						<div class="field">
							<input name="bizScope" id="bizScope" type="text"
								   class="ui-textbox" value="${prjLnkComp.bizScope }" validate="{required:true}">
								   <span class="requiredSymbol">*</span>
						</div>
					</div>
					<div class="fieldBox col_50" rlPsnDiv="zk">
						<div class="label">法人代表</div>
						<div class="field">
							<input name="corpRep" id="corpRep" type="text" isShow="iscar"
								   class="ui-textbox" value="${prjLnkComp.corpRep }"> <span
								class="requiredSymbol" isShow="iscar">*</span>
						</div>
					</div>
					<div class="fieldBox col_50" rlPsnDiv="zk">
						<div class="label">法人身份证号</div>
						<div class="field">
							<input name="idNo" id="idNo" type="text" class="ui-textbox"
								   value="${prjLnkComp.idNo }">
						</div>
					</div>

					<div class="fieldBox col_50">
						<div class="label">现累计挂靠数量</div>
						<div class="field">
							<input name="totLnkQty" id="totLnkQty" type="text"
								   class="ui-textbox" value="${prjLnkComp.totLnkQty }">
						</div>
					</div>
					<div class="fieldBox col_50">
						<div class="label">自有车辆备案数量</div>
						<div class="field">
							<input name="ownQty" id="ownQty" type="text" class="ui-textbox"
								   value="${prjLnkComp.ownQty }">
						</div>
					</div>
					<div class="fieldBox col_50">
						<div class="label">在我司累积挂靠车辆</div>
						<div class="field">
							<input name="ourTotLnkQyt" id="ourTotLnkQyt" type="text"
								   class="ui-textbox" value="${prjLnkComp.ourTotLnkQyt }">
						</div>
					</div>
					<div class="fieldBox col_50">
						<div class="label">可支持挂靠项目类型</div>
						<div class="field">
							<input name="suppLnkPrjTypCd" id="suppLnkPrjTypCd" type="text" ltype="combobox" validate="{required:true}"><span
								class="requiredSymbol">*</span>
						</div>
					</div>
					<c:if test="${isCheckVerify == 1}">
						<div class="fieldBox col_50">
							<div class="label">三方授权书是否提供</div>
							<div class="field">
		                        <select name="isUploadLoa" id="isUploadLoa" data-value=" " validate ="{required:true,select:true}">
		                        	<option value=" " checked >请选择</option>
		                        	<option value="1">是</option>
		                        	<option value="0">否</option>
									
								</select>
		                    </div>
						</div>
						<div class="fieldBox col_50">
							<div class="label">三方授权书是否回收</div>
							<div class="field">
		                        <select name="isRecycleLoa" id="isRecycleLoa" data-value=" " validate ="{required:true,select:true}">
		                        	<option value=" " checked >请选择</option>
		                        	<option value="1">是</option>
		                        	<option value="0">否</option>
									
								</select>
		                    </div>
						</div>
					</c:if>
					<div class="fieldBox col_66_auto">
						<div class="label">区域</div>
						<div class="field">
							<!-- <input name="rgnPrCd" id="rgnPrCd" type="text" class="ui-textbox" value=""> -->
							<jsp:include page="../../system/sysRegion/region.jsp"
										 flush="true">
								<jsp:param name="regionShowLvl" value="2"/>
							</jsp:include>
						</div>
					</div>
					<div class="fieldBox col_50" rlPsnDiv="zk">
						<div class="label">实际控制人</div>
						<div class="field">
							<input name="actCtrlNm" id="actCtrlNm" type="text"
								   class="ui-textbox" value="${prjLnkComp.actCtrlNm}"
								   validate="{required:true}"> <span
								class="requiredSymbol">*</span>
						</div>
					</div>
					<div class="fieldBox col_50" rlPsnDiv="zk">
						<div class="label">实际控制人手机号码</div>
						<div class="field">
							<input name="actCtrlMp" id="actCtrlMp" type="text"
								   class="ui-textbox" value="${prjLnkComp.actCtrlMp }"
								   validate="{required:true}"> <span
								class="requiredSymbol">*</span>
						</div>
					</div>
					<div class="fieldBox col_50" rlPsnDiv="zk">
						<div class="label">联系人</div>
						<div class="field">
							<input name="lnkNm" id="lnkNm" type="text" class="ui-textbox"
								   value="${prjLnkComp.lnkNm }">
						</div>
					</div>
					<div class="fieldBox col_50" rlPsnDiv="zk">
						<div class="label">联系人手机号码</div>
						<div class="field">
							<input name="lnkMp" id="lnkMp" type="text" isShow="iscar"
								   class="ui-textbox" value="${prjLnkComp.lnkMp }"> <span
								class="requiredSymbol" isShow="iscar">*</span>
						</div>
					</div>
					<div class="fieldBox col_50" rlPsnDiv="zk">
						<div class="label">联系人职务</div>
						<div class="field">
							<input name="lnkPost" id="lnkPost" type="text"
								   class="ui-textbox" value="${prjLnkComp.lnkPost }">
						</div>
					</div>
					<div class="fieldBox col_100">
						<div class="label">备注</div>
						<div class="field">
								<textarea name="rem" id="rem" rows="4"
										  class="ui-textarea l-textarea" style="width: 80%"
										  value="">${prjLnkComp.rem } </textarea>
						</div>
					</div>

				<div class="fieldBox col_100" style="display: none;">
					<div class="field">
						<input name="lnkCompId" id="lnkCompId" type="text"
							   class="ui-textbox" value="${prjLnkComp.id }">
					</div>
				</div>
				<c:if test="${flag == 1}">
				<div class="fieldset1 tabel_col clearFix">
                    <div class="caption">
                        <span class="title">项目发起人信息</span>
                    </div>
                    <div class="fieldset1 tabel_col clearFix">
                        <div class="fieldBox col_33">
                            <div class="label">客户经理</div>
                            <div class="field">
                                <span id="startPrjCstMgrNm" name="startPrjCstMgrNm">&nbsp;</span>
                            </div>
                        </div>
                        <div class="fieldBox col_33">
                            <div class="label">联系方式</div>
                            <div class="field">
                                <span id="startPrjCstMgrTel" name="startPrjCstMgrTel">&nbsp;</span>
                            </div>
                        </div>
                        <div class="fieldBox col_33">
                            <div class="label">所属机构</div>
                            <div class="field">
                                <span id="startPrjCstMgrOrgCdNm" name="startPrjCstMgrOrgCdNm">&nbsp;</span>
                            </div>
                        </div>
                    </div>
                </div>
                </c:if>
					<div class="fieldBox col_50" id="propCdDiv">
						<div class="label">渠道担保业务类型</div>
						<div class="field">
							<input name="propCd" id="propCd" type="text" ltype="combobox">
						</div>
					</div>
					<div class="fieldBox col_100_auto" id = "validDiv">
						<div class="label">渠道担保协议有效期</div>
						<div class="field">
							<input width="20px" name="validTmStar" id="validTmStar" value="${prjLnkComp.validTmStar}" type="text" class="ui-datepicker" >
							-
							<input width="20px" name="validTmEnd" id="validTmEnd" value="${prjLnkComp.validTmEnd}" type="text" class="ui-datepicker" >
							<span class="requiredSymbol">*</span>
						</div>
					</div>
					<div class="fieldBox col_66" id="roadDiv">
						<div class="label">公路车【首期】比例</div>
						<div class="field" style="width: 100%;">
							<input name="roadBicycleRate" id="roadBicycleRate"  value="${prjLnkComp.roadBicycleRate}" type="text" class="ui-textbox" validate="{number:true}" ><span>%</span>
							<span class="requiredSymbol">*</span>
						</div>
					</div>
					<div class="fieldBox col_66" id="stopDiv">
						<div class="label">工程车【首期】比例</div>
						<div class="field" style="width: 100%;">
							<input name="stopTruckRate" id="stopTruckRate" type="text" value="${prjLnkComp.stopTruckRate}" class="ui-textbox" validate="{number:true}"><span>%</span>
							<span class="requiredSymbol">*</span>
						</div>
					</div>
					<div class="fieldset1 tabel_col tabel_col_s clearFix" id="propFileDiv">
						<div class="sqPanel_body">
							<div id="propFileCfgGrid" class="sq-grid"></div>
						</div>
					</div>
				</div>
				<div class="fieldBox col_100" id="psnDiv" style="display: none">
					<div class="sqPanel">
						<div class="sqPanel_head inL">
							<div class="btnsBox inLC">
									<span id="addBtn" onclick="addBtn();"
										  class="sq-button sq-button-round">添加</span>
							</div>

							<span>主要人员信息</span>

							<div class="fieldBox col_100" style="display: none;">
								<div class="field">
									<input name="prelist" id="preList" type="text"
										   class="ui-textbox" value="${rlPsnList}">
								</div>
								<div class="field">
									<input name="applyId" id="applyId" type="text"
										   class="ui-textbox" value="${applyId}">
								</div>
							</div>
						</div>
						<br/> <br/>
						<div id="psnGrid">
							<div id="ligergrid_psn" class="sq-grid"></div>
						</div>
					</div>
				</div>
				<div class="fieldset1 tabel_col tabel_col_s clearFix">
					<div class="caption">
						<span class="title">上传附件信息 </span>
					</div>
					<div class="sqPanel_body">
						<div id="lnkFileInfoCfgGrid" class="sq-grid"></div>
					</div>
					<%--<div class="fieldBox col_100" id="fileDetail">
						<div class="label">资料上传</div>
						<div class="field">
							<jsp:include
									page="../../system/sysUlFilesRec/sysSysUlFilesRecUpload2.jsp"
									flush="true">
								<jsp:param name="filePath" value="lnkcomp"/>
							</jsp:include>
							<input name="lnkCompId" id="lnkCompId" type="hidden"
								   class="ui-textbox" value="${prjLnkComp.id }">
						</div>
					</div>

					<div class="fieldBox col_100" id="fileModify">
						<div class="label">资料</div>
						<div class="field">
							<jsp:include
									page="../../system/sysUlFilesRec/sysUlFileRecList.jsp"
									flush="true">
								<jsp:param name="pkId" value="${prjLnkComp.id }"/>
								<jsp:param name="tabNm" value="PRJ_LNK_COMP"/>
							</jsp:include>
						</div>
					</div>--%>
				</div>
				<input name="oldOwner" id="oldOwner" type="hidden"
								   class="ui-textbox" value="${prjLnkComp.ownerCd}">
				<div class="btnsBox">
						<span id="prj_lnk_comp_add_btn_id"
							  class="sq-button sq-button-round" onclick="lnkwsCheck();">
							<!-- <i class="sqBtnIco_10"></i> -->保存
						</span> <span id="prj_lnk_comp__cancel_btn_id"
									  class="sq-button sq-button-round" onclick="cancelBtn();">
							<!-- <i class="sqBtnIco_14"></i> -->取消
						</span>
						<c:if test="${flag == 1}">
							<span id="relationships" onclick="relationshipsView()"
                          class="sq-button sq-button-round">集团关联图谱</span>
						</c:if>
				</div>
			</form>
		</div>
		<div tabid="tabB" title="相关项目" id="tabBId">
			<iframe frameborder="0" name="tabB" id="tabB" src=""></iframe>
		</div>
		<div tabid="tabC" title="备案账号" id="tabCId">
			<iframe frameborder="0" name="tabC" id="tabC" src=""></iframe>
		</div>
		<div tabid="tabH" title="变更记录">
			<iframe src="" frameborder="0" name="tabH" id="tabH"></iframe>
		</div>
		<div tabid="tabD" title="敞口历史" id="tabDId">
			<iframe frameborder="0" name="tabD" id="tabD" src=""></iframe>
		</div>
		<div tabid="tabE" title="人工干预" id="tabEId">
			<iframe frameborder="0" name="tabE" id="tabE" src=""></iframe>
		</div>
		<div tabid="tabG" title="附件资料">
			<iframe src="" frameborder="0" name="tabG" id="tabG"></iframe>
		</div>
		
	</div>
</div>
</div>

<script type="text/javascript">

    var BuOrgCd = '${BuOrgCd}';
    var audStsCd = '${audStsCd}';
    var applyId = '${applyId}';
    var rlPsnGrid;
    var rlPsnList = null;
    var isFlow = '${isFlow}';
    if ('${rlPsnList}') {
        rlPsnList =${rlPsnList};
    }
    var certTypCdList =${certTypCdList};
    var rlRsnTypListJSON =${rlRsnTypListJSON};
    var rlRsnTypList = [];
    if ('${rlRsnTypList}') {
        rlRsnTypList = JSON.parse('${rlRsnTypList}');
    }
    //默认必填项
    var mustAddRlPsnJSON = [];
    if ('${mustAddRlPsnTypCdJSON}') {
        mustAddRlPsnJSON = JSON.parse('${mustAddRlPsnTypCdJSON}');
    }
	//默认非必填项
	var noAddRlPsnJSON = [];
	if ('${noAddRlPsnTypCdJSON}') {
		noAddRlPsnJSON = '${noAddRlPsnTypCdJSON}';
	}

	var lnkFileInfoCfgGrid = null;//挂靠公司资料配置明细
	var propFileCfgGrid = null;//挂靠公司资料配置明细
	var upload_result_params = [];
	var upload_result_params2 = [];
	var serverPrefixPath = "";
	var deleteFileIdS = [];
	var isCheckVerify = '${isCheckVerify}';
	
	var pageFlag = '${flag}';

	//默认归属第三方
	var _cfgSysCd = '${cfgSysCd2}'; //附件系统CODE
	var _cfgOrgCd = '${cfgOrgCd2}'; //附件组织架构
	var _tabNm = '${tabNm2}'; //附件对应表
	var _cfgCd = '${cfgCd2}'; //附件CODE
	var _modulePath = '${modulePath2}';
	var _costomerPath = '${costomerPath2}';
	var _rootPath = '${rootPath2}';
	var _uploadSysCd = '${uploadSysCd2}';

	//当挂靠公司归属为自有
	if ('1' == '${prjLnkComp.ownerCd}') {
		_cfgSysCd = '${cfgSysCd1}'; //附件系统CODE
		_cfgOrgCd = '${cfgOrgCd1}'; //附件组织架构
		_tabNm = '${tabNm1}'; //附件对应表
		_cfgCd = '${cfgCd1}'; //附件CODE
		_modulePath = '${modulePath1}';
		_costomerPath = '${costomerPath1}';
		_rootPath = '${rootPath1}';
		_uploadSysCd = '${uploadSysCd1}';
	} else if ('3' == '${prjLnkComp.ownerCd}') {
		_cfgSysCd = '${cfgSysCd3}'; //附件系统CODE
		_cfgOrgCd = '${cfgOrgCd3}'; //附件组织架构
		_tabNm = '${tabNm3}'; //附件对应表
		_cfgCd = '${cfgCd3}'; //附件CODE
		_modulePath = '${modulePath3}';
		_costomerPath = '${costomerPath3}';
		_rootPath = '${rootPath3}';
		_uploadSysCd = '${uploadSysCd3}';
	}

	var _propCfgSysCd = '${propCfgSysCd}'; //附件系统CODE
	var _propCfgOrgCd = '${propCfgOrgCd}'; //附件组织架构
	var _propTabNm = '${propTabNm}'; //附件对应表
	var _propCfgCd = '${propCfgCd}'; //附件CODE
	var _propModulePath = '${propModulePath}';
	var _propCostomerPath = '${propCostomerPath}';
	var _propRootPath = '${propRootPath}';
	var _propUploadSysCd = '${propUploadSysCd}';
	var _isShowRate = '${isShowRate}';

	var allCfgDtlCdList = [];
	if ('${allCfgDtlCdList}') {
		allCfgDtlCdList = JSON.parse('${allCfgDtlCdList}');
	}

    var pageInApp = {
        flag: true
    };
    $(function () {
        initStyle();

        initData();

        disableFiled();
		if(2 == $( "#ownerCd").val()){
			$("#propCdDiv").show();
			$("#validDiv").show();
			if(_isShowRate && _isShowRate == 1) {
				$("#stopDiv").show();
				$("#roadDiv").show();
			}else{
				$("#stopDiv").hide();
				$("#roadDiv").hide();
			}
			$("#propFileDiv").show();
		}else{
			$("#propCdDiv").hide();
			$("#validDiv").hide();
			$("#stopDiv").hide();
			$("#roadDiv").hide();
			$("#propFileDiv").hide();
		}

        var lnkCompId = $("#lnkCompId").val();
        /*if (BuOrgCd == "00000005") {
            initRlPsnCarGrid();
        } else {
            initRlPsnGrid();
        }*/
        if(pageFlag == 1){
        	initRlPsnAudGrid();
        }else{
        	initRlPsnGrid();
        }
        

        //禁用表单所有数据
        //disableFiled();

		lnkFileInfoCfgGrid = $("#lnkFileInfoCfgGrid").ligerGrid({
			url: '<%=path%>/project/prjlnkcomp/initLnkFileInfoList.do?pkId='+lnkCompId+'&cfgCd='+_cfgCd +'&tabNm='+_tabNm +"&cfgSysCd="+_cfgSysCd+'&cfgOrgCd='+_cfgOrgCd+'&uploadSysCd='+_uploadSysCd+'&applyId='+applyId,
			method: 'get',
			columns: [
				{display: '资料名称', name: 'datNm',align: 'left', minWidth: 100, enabledSort: false,
					render:function (rowdata, rowindex, value) {
						var mustSymbol = '<span class="requiredSymbol">*</span>';
						if (rowdata.isMust == 1) {
							return value + mustSymbol;
						} else {
							return value;
						}
					}
				},
				{display: '上传文件名称', name: 'fileNm',align: 'left', minWidth: 100, enabledSort: false,
					render:function(rowdata,rowindex,value){
						if(value){
							var h;
							h='<a href="javascript:uploadFileByUrl(';
							h+="'"+rowdata.filePath+"'";
							h+=",'"+rowdata.fileNm+"'";
							h+=')">'+rowdata.fileNm+'</a>'
							return h;
						}
					}
				},
				{display: '上传文件路径', name: 'filePath',align: 'left', minWidth: 100,hide:true},
				{display: '上传文件明细', name: 'cfgDtlCd',align: 'left', minWidth: 100,hide:true},
				{display: '上传时间', name: 'crtTm',align: 'left', minWidth: 100, enabledSort: false,render:renderDate},
				{display: '状态', name: 'audStsCdNm', width: 100, enabledSort: false},
				{display: '操作', name: '', minWidth: 200,align: 'left',  enabledSort: false,
					render:function(rowdata,rowindex,value){
						if(pageFlag == 1){
							var h='';
	                        if(rowdata.audStsCd){
	                            if(rowdata.audStsCd !=1){
	                                if(!isCheckVerify || isCheckVerify != 1 ){
	                                }else{
	                                    h += '<a class="sq-button-hasicon" style="cursor:pointer;" onclick="modifyAudStsCd(event,' + rowdata.fileId + ',1);"><i class="sqBtnIco_15"></i>验证通过</a>';
	                                    h += '<a class="sq-button-hasicon" style="cursor:pointer;" onclick="modifyAudStsCd(event,' + rowdata.fileId + ',2);"><i class="sqBtnIco_14"></i>验证不通过</a>';
	                                }
	                            }else{
	                                if (isCheckVerify && isCheckVerify == 1) {
	                                    h += '<a class="sq-button-hasicon" style="cursor:pointer;" onclick="modifyAudStsCd(event,' + rowdata.fileId + ',1);"><i class="sqBtnIco_15"></i>验证通过</a>';
	                                    h += '<a class="sq-button-hasicon" style="cursor:pointer;" onclick="modifyAudStsCd(event,' + rowdata.fileId + ',2);"><i class="sqBtnIco_14"></i>验证不通过</a>';
	                                }
	                            }
	                        }else{
	                            //h += '<a class="sq-button-hasicon" style="cursor:pointer;" onclick="delUpLoadindFile(event,' + rowindex + ','+rowdata.cfgDtlCd+');"><i class="sqBtnIco_7"></i>删除</a>';
	                        }
	                        return h;
						}else{
							var h='';
							if(rowdata.audStsCd){
								if(rowdata.audStsCd !=1){
									if(!isCheckVerify || isCheckVerify != 1 ){
										if(rowdata.fileId) {
											h += '<a class="sq-button-hasicon" style="cursor:pointer;" onclick="delFile(event,' + rowdata.fileId + ',' + rowindex + ');"><i class="sqBtnIco_7"></i>删除</a>';
										}else{
											h += '<a class="sq-button-hasicon" style="cursor:pointer;" onclick="delUpLoadindFile(event,' + rowindex +','+rowdata.cfgDtlCd+');"><i class="sqBtnIco_7"></i>删除</a>';
										}
									}else{
										h += '<a class="sq-button-hasicon" style="cursor:pointer;" onclick="modifyAudStsCd(event,' + rowdata.fileId + ',1);"><i class="sqBtnIco_15"></i>验证通过</a>';
										h += '<a class="sq-button-hasicon" style="cursor:pointer;" onclick="modifyAudStsCd(event,' + rowdata.fileId + ',2);"><i class="sqBtnIco_14"></i>验证不通过</a>';
									}
								}else{
								    if (isCheckVerify && isCheckVerify == 1) {
	                                    h += '<a class="sq-button-hasicon" style="cursor:pointer;" onclick="modifyAudStsCd(event,' + rowdata.fileId + ',1);"><i class="sqBtnIco_15"></i>验证通过</a>';
	                                    h += '<a class="sq-button-hasicon" style="cursor:pointer;" onclick="modifyAudStsCd(event,' + rowdata.fileId + ',2);"><i class="sqBtnIco_14"></i>验证不通过</a>';
	                                }
								}
							}else{
								h += '<a class="sq-button-hasicon" style="cursor:pointer;" onclick="delUpLoadindFile(event,' + rowindex + ','+rowdata.cfgDtlCd+');"><i class="sqBtnIco_7"></i>删除</a>';
							}
							return h;
						}
					}
				},
				{display: '上传', name: 'uploadNm', width: 80,align: 'left', enabledSort: false,
					render:function(rowdata,rowindex,value){
						if(pageFlag == 1){
							return "";
						}
						var h='';
						if(audStsCd && audStsCd != 1){
							if(rowdata.fileId){
								if(rowdata.audStsCd && rowdata.audStsCd !=1){
									h+='<span class="sq-button sq-button-round fileupload-button">上传<input type="file" id="fileup_'+_cfgCd+'_'+rowdata.cfgDtlCd+'" multiple name="fileup_'+_cfgCd+'_'+rowdata.cfgDtlCd+'"' +
											' class="fileupload-input" onchange="onChangefile_multi(event,\''+_cfgCd+'\',\''+rowdata.cfgDtlCd+'\',\''+_cfgOrgCd+'\')"></span>';
								}else {//if(!rowdata.audStsCd){
									h+='<span class="sq-button sq-button-round fileupload-button">上传<input type="file" id="fileup_'+_cfgCd+'_'+rowdata.cfgDtlCd+'" multiple name="fileup_'+_cfgCd+'_'+rowdata.cfgDtlCd+'"' +
											' class="fileupload-input" onchange="onChangefile_multi(event,\''+_cfgCd+'\',\''+rowdata.cfgDtlCd+'\',\''+_cfgOrgCd+'\')"></span>';
								}
							}else{
								h+='<span class="sq-button sq-button-round fileupload-button">上传<input type="file" id="fileup_'+_cfgCd+'_'+rowdata.cfgDtlCd+'" multiple name="fileup_'+_cfgCd+'_'+rowdata.cfgDtlCd+'"' +
										' class="fileupload-input" onchange="onChangefile_multi(event,\''+_cfgCd+'\',\''+rowdata.cfgDtlCd+'\',\''+_cfgOrgCd+'\')"></span>';
							}
						}

						/*if(!rowdata.fileId || (!rowdata.audStsCd || rowdata.audStsCd !=1) || (audStsCd && audStsCd !=1)){
                            h+='<span class="sq-button sq-button-round fileupload-button">上传<input type="file" id="fileup_'+rowdata.cfgCd+'_'+rowdata.cfgDtlCd+'" multiple name="fileup_'+rowdata.cfgCd+'_'+rowdata.cfgDtlCd+'"' +
                                ' class="fileupload-input" onchange="onChangefile_multi(event,\''+rowdata.cfgCd+'\',\''+rowdata.cfgDtlCd+'\',\''+rowdata.orgCd+'\',\''+rowdata.fileId+'\',\''+rowindex+'\')"></span>';
                        }*/
						return h;
					}
				},
			],
			root: 'rows',
			hideLoadButton : true,
			width: '100%',
			height: '100%',
			isScroll: false,
			rownumbers:true,  //显示序号
			checkbox: false,
			allowUnSelectRow:true,
			alternatingRow: false,
			frozen: false,
			usePager: false,
			onAfterShowData: function ()
			{
				$('#lnkFileInfoCfgGrid').rowspan('datNm');
				$('#lnkFileInfoCfgGrid').rowspan('uploadNm');
			},
			onSuccess : function(data,grid){
				upload_result_params = [];
				var uploadJOSN = JSON.parse(JSON.stringify(data.rows));
				console.log("uploadJOSN =s= " + JSON.stringify(uploadJOSN));
				for (var i=0; i< uploadJOSN.length; i++){
					if (StringUtils.isNotEmpty(uploadJOSN[i].fileNm)) {
						upload_result_params.push(uploadJOSN[i]);
					}
				}
				console.log("upload_result_params =s= " + JSON.stringify(upload_result_params));

				//初始化必传标识
				var rows = data.rows;
				for (var i = 0; i < rows.length; i++) {
					for (var j = 0; j < allCfgDtlCdList.length; j++) {
						if (allCfgDtlCdList[j].cfgCd == _cfgCd) {
							if (allCfgDtlCdList[j].cfgDtlCd == rows[i].cfgDtlCd) {
								var currentRow = rows[i];
								currentRow.isMust = allCfgDtlCdList[j].isMust;
								lnkFileInfoCfgGrid.updateRow(rows[i], currentRow);
								//lnkFileInfoCfgGrid.reRender();
							}
						}
					}
				}
			},
		});
		propFileCfgGrid = $("#propFileCfgGrid").ligerGrid({
			url: '<%=path%>/project/prjlnkcomp/initPropFileList.do?cfgCd='+_propCfgCd +'&tabNm='+_propTabNm +"&cfgSysCd="+_propCfgSysCd+'&cfgOrgCd='+_propCfgOrgCd+'&uploadSysCd='+_propUploadSysCd,
			parms:{pkId:lnkCompId,isApply:1,applyId:applyId},
			method: 'get',
			columns: [
				{display: '资料名称', name: 'datNm',align: 'left', minWidth: 100, enabledSort: false,
					render:function (rowdata, rowindex, value) {
						var mustSymbol = '<span class="requiredSymbol">*</span>';
						if (rowdata.isMust == 1) {
							return value + mustSymbol;
						} else {
							return value;
						}
					}
				},
				{display: '上传文件名称', name: 'fileNm',align: 'left', minWidth: 100, enabledSort: false,
					render:function(rowdata,rowindex,value){
						if(value){
							var h;
							h='<a href="javascript:uploadFileByUrl(';
							h+="'"+rowdata.filePath+"'";
							h+=",'"+rowdata.fileNm+"'";
							h+=')">'+rowdata.fileNm+'</a>'
							return h;
						}
					}
				},
				{display: '上传文件路径', name: 'filePath',align: 'left', minWidth: 100,hide:true},
				{display: '上传文件明细', name: 'cfgDtlCd',align: 'left', minWidth: 100,hide:true},
				{display: '上传时间', name: 'crtTm',align: 'left', minWidth: 100, enabledSort: false,render:renderDate},
				{display: '状态', name: 'audStsCdNm', width: 100, enabledSort: false},
				{display: '操作', name: '', minWidth: 200,align: 'left',  enabledSort: false,
					render:function(rowdata,rowindex,value){
						var h='';
						if(rowdata.audStsCd){
							if(rowdata.audStsCd !=1){
								if(!isCheckVerify || isCheckVerify != 1 ){
									if(rowdata.fileId) {
										h += '<a class="sq-button-hasicon" style="cursor:pointer;" onclick="delFile2(event,' + rowdata.fileId + ',' + rowindex + ');"><i class="sqBtnIco_7"></i>删除</a>';
									}else{
										h += '<a class="sq-button-hasicon" style="cursor:pointer;" onclick="delUpLoadindFile2(event,' + rowindex +','+rowdata.cfgDtlCd+');"><i class="sqBtnIco_7"></i>删除</a>';
									}
								}else{
									h += '<a class="sq-button-hasicon" style="cursor:pointer;" onclick="modifyAudStsCd(event,' + rowdata.fileId + ',1);"><i class="sqBtnIco_15"></i>验证通过</a>';
									h += '<a class="sq-button-hasicon" style="cursor:pointer;" onclick="modifyAudStsCd(event,' + rowdata.fileId + ',2);"><i class="sqBtnIco_14"></i>验证不通过</a>';
								}
							}else{
								if (isCheckVerify && isCheckVerify == 1) {
									h += '<a class="sq-button-hasicon" style="cursor:pointer;" onclick="modifyAudStsCd(event,' + rowdata.fileId + ',1);"><i class="sqBtnIco_15"></i>验证通过</a>';
									h += '<a class="sq-button-hasicon" style="cursor:pointer;" onclick="modifyAudStsCd(event,' + rowdata.fileId + ',2);"><i class="sqBtnIco_14"></i>验证不通过</a>';
								}
							}
						}else{
							h += '<a class="sq-button-hasicon" style="cursor:pointer;" onclick="delUpLoadindFile2(event,' + rowindex + ','+rowdata.cfgDtlCd+');"><i class="sqBtnIco_7"></i>删除</a>';
						}
						return h;
					}
				},
				{display: '上传', name: 'uploadNm', width: 80,align: 'left', enabledSort: false,
					render:function(rowdata,rowindex,value){
						var h='';
						if(audStsCd && audStsCd != 1){
							if(rowdata.fileId){
								if(rowdata.audStsCd && rowdata.audStsCd !=1){
									h+='<span class="sq-button sq-button-round fileupload-button">上传<input type="file" id="fileup_'+_propCfgCd+'_'+rowdata.cfgDtlCd+'" multiple name="fileup_'+_propCfgCd+'_'+rowdata.cfgDtlCd+'"' +
											' class="fileupload-input" onchange="onChangefile_multi2(event,\''+_propCfgCd+'\',\''+rowdata.cfgDtlCd+'\',\''+_cfgOrgCd+'\')"></span>';
								}else {//if(!rowdata.audStsCd){
									h+='<span class="sq-button sq-button-round fileupload-button">上传<input type="file" id="fileup_'+_propCfgCd+'_'+rowdata.cfgDtlCd+'" multiple name="fileup_'+_propCfgCd+'_'+rowdata.cfgDtlCd+'"' +
											' class="fileupload-input" onchange="onChangefile_multi2(event,\''+_propCfgCd+'\',\''+rowdata.cfgDtlCd+'\',\''+_cfgOrgCd+'\')"></span>';
								}
							}else{
								h+='<span class="sq-button sq-button-round fileupload-button">上传<input type="file" id="fileup_'+_propCfgCd+'_'+rowdata.cfgDtlCd+'" multiple name="fileup_'+_propCfgCd+'_'+rowdata.cfgDtlCd+'"' +
										' class="fileupload-input" onchange="onChangefile_multi2(event,\''+_propCfgCd+'\',\''+rowdata.cfgDtlCd+'\',\''+_cfgOrgCd+'\')"></span>';
							}
						}

						/*if(!rowdata.fileId || (!rowdata.audStsCd || rowdata.audStsCd !=1) || (audStsCd && audStsCd !=1)){
                            h+='<span class="sq-button sq-button-round fileupload-button">上传<input type="file" id="fileup_'+rowdata.cfgCd+'_'+rowdata.cfgDtlCd+'" multiple name="fileup_'+rowdata.cfgCd+'_'+rowdata.cfgDtlCd+'"' +
                                ' class="fileupload-input" onchange="onChangefile_multi(event,\''+rowdata.cfgCd+'\',\''+rowdata.cfgDtlCd+'\',\''+rowdata.orgCd+'\',\''+rowdata.fileId+'\',\''+rowindex+'\')"></span>';
                        }*/
						return h;
					}
				},
			],
			root: 'rows',
			hideLoadButton : true,
			width: '100%',
			height: '100%',
			isScroll: false,
			rownumbers:true,  //显示序号
			checkbox: false,
			allowUnSelectRow:true,
			alternatingRow: false,
			frozen: false,
			usePager: false,
			onAfterShowData: function ()
			{
				$('#propFileCfgGrid').rowspan('datNm');
				$('#propFileCfgGrid').rowspan('uploadNm');
			},
			onSuccess : function(data,grid){
				upload_result_params2 = [];
				var uploadJOSN = JSON.parse(JSON.stringify(data.rows));
				console.log("uploadJOSN =s= " + JSON.stringify(uploadJOSN));
				for (var i=0; i< uploadJOSN.length; i++){
					if (StringUtils.isNotEmpty(uploadJOSN[i].fileNm)) {
						upload_result_params2.push(uploadJOSN[i]);
					}
				}
				console.log("upload_result_params2 =s= " + JSON.stringify(upload_result_params));

			},
		});

		$("#ownerCd").bind("change",function(e){
			var ownerCd = $("#ownerCd").val();
			if(ownerCd == 2){
				$("#propCdDiv").show();
				$("#validDiv").show();
				if(_isShowRate && _isShowRate == 1) {
					$("#stopDiv").show();
					$("#roadDiv").show();
				}else{
					$("#stopDiv").hide();
					$("#roadDiv").hide();
				}
				$("#propFileDiv").show();
			}else{
				$("#propCdDiv").hide();
				$("#validDiv").hide();
				$("#stopDiv").hide();
				$("#roadDiv").hide();
				$("#propFileDiv").hide();
			}
			console.log(ownerCd);
			if (3 == ownerCd) {
				_cfgSysCd = '${cfgSysCd3}'; //附件系统CODE
				_cfgOrgCd = '${cfgOrgCd3}'; //附件组织架构
				_tabNm = '${tabNm3}'; //附件对应表
				_cfgCd = '${cfgCd3}'; //附件CODE
				_modulePath = '${modulePath3}';
				_costomerPath = '${costomerPath3}';
				_rootPath = '${rootPath3}';
				_uploadSysCd = '${uploadSysCd3}';
			} else if (1 == ownerCd) {
				_cfgSysCd = '${cfgSysCd1}'; //附件系统CODE
				_cfgOrgCd = '${cfgOrgCd1}'; //附件组织架构
				_tabNm = '${tabNm1}'; //附件对应表
				_cfgCd = '${cfgCd1}'; //附件CODE
				_modulePath = '${modulePath1}';
				_costomerPath = '${costomerPath1}';
				_rootPath = '${rootPath1}';
				_uploadSysCd = '${uploadSysCd1}';
			} else {
				_cfgSysCd = '${cfgSysCd2}'; //附件系统CODE
				_cfgOrgCd = '${cfgOrgCd2}'; //附件组织架构
				_tabNm = '${tabNm2}'; //附件对应表
				_cfgCd = '${cfgCd2}'; //附件CODE
				_modulePath = '${modulePath2}';
				_costomerPath = '${costomerPath2}';
				_rootPath = '${rootPath2}';
				_uploadSysCd = '${uploadSysCd2}';
			}

			var rows = lnkFileInfoCfgGrid.data.rows;
			for (var i = 0; i < rows.length; i++) {
				for (var j = 0; j < allCfgDtlCdList.length; j++) {
					if (allCfgDtlCdList[j].cfgCd == _cfgCd) {
						if (allCfgDtlCdList[j].cfgDtlCd == rows[i].cfgDtlCd) {
							var currentRow = rows[i];
							currentRow.isMust = allCfgDtlCdList[j].isMust;
							lnkFileInfoCfgGrid.updateRow(rows[i], currentRow);
							lnkFileInfoCfgGrid.reRender();
						}
					}
				}
			}
		})

    });

    function relationshipsView() {
        var org_cd = $("#succ").val();
        var id = $("#sid").val();
        var currentUserId = '${currentUserId}';
        if (!org_cd) {
            $.ligerDialog.SQalert({content: "社会同一信用代码为空！", SQ_type: "warning"});
            return false;
        }
        Add_navTab('tab_relationships_view_data' + applyId + '1', '集团关联图谱', '<%=path%>/knowledgeGraph/init/initGraphGroupPage.do?org_code=' + org_cd+'&usrId='+currentUserId);
    }
	//删除文件
	function delFile(event,_fileId,rowIndex){
		top.$.ligerDialog.confirm("确认删除吗?", function (flag) {
			if(!flag){
				return;
			}else{
				var wait_dialog;
				wait_dialog = $.ligerDialog.SQalert({content: LogUtils.LOG_CMM_DATA_LOADING, SQ_type: "waitting"});

				var row = lnkFileInfoCfgGrid.getRow(rowIndex);

				for (var i=0; i< upload_result_params.length; i++){
					if(upload_result_params[i].cfgDtlCd == row.cfgDtlCd && upload_result_params[i].filePath == row.filePath){
						console.log("cfgDtlCd =j= " + row.cfgDtlCd);
						upload_result_params.splice(i,1);
						break;
					}
				}

				var gridData = lnkFileInfoCfgGrid.getData();
				var count = 0;

				for (var i = 0; i < gridData.length; i++) {
					if (gridData[i].datNm == row.datNm) {
						count ++;
					}
				}

				if (count <= 1) {
					lnkFileInfoCfgGrid.updateCell("filePath",'',rowIndex);
					lnkFileInfoCfgGrid.updateCell("fileNm",'',rowIndex);
					lnkFileInfoCfgGrid.updateCell("crtTm",'',rowIndex);
				} else {
					lnkFileInfoCfgGrid.deleteRow(rowIndex);
				}

				deleteFileIdS.push(_fileId);
				console.log("upload_result_params =k= " + JSON.stringify(upload_result_params));
				console.log("deleteFileIds --> " + JSON.stringify(deleteFileIdS));
				wait_dialog.close();
			}
		});
	}

	function delFile2(event,_fileId,rowIndex){
		top.$.ligerDialog.confirm("确认删除吗?", function (flag) {
			if(!flag){
				return;
			}else{
				var wait_dialog;
				wait_dialog = $.ligerDialog.SQalert({content: LogUtils.LOG_CMM_DATA_LOADING, SQ_type: "waitting"});

				var row = propFileCfgGrid.getRow(rowIndex);

				for (var i=0; i< upload_result_params2.length; i++){
					if(upload_result_params2[i].cfgDtlCd == row.cfgDtlCd && upload_result_params[i].filePath == row.filePath){
						console.log("cfgDtlCd =j= " + row.cfgDtlCd);
						upload_result_params2.splice(i,1);
						break;
					}
				}

				var gridData = propFileCfgGrid.getData();
				var count = 0;

				for (var i = 0; i < gridData.length; i++) {
					if (gridData[i].datNm == row.datNm) {
						count ++;
					}
				}

				if (count <= 1) {
					propFileCfgGrid.updateCell("filePath",'',rowIndex);
					propFileCfgGrid.updateCell("fileNm",'',rowIndex);
					propFileCfgGrid.updateCell("crtTm",'',rowIndex);
				} else {
					propFileCfgGrid.deleteRow(rowIndex);
				}

				deleteFileIdS.push(_fileId);
				console.log("upload_result_params =k= " + JSON.stringify(upload_result_params2));
				console.log("deleteFileIds --> " + JSON.stringify(deleteFileIdS));
				wait_dialog.close();
			}
		});
	}

	function onChangefile_multi(e,cfgCd,cfgDtlCd,orgCd,fileId,rowIndex) {
		console.log("e == " + JSON.stringify(e));
		var wait_dialog = $.ligerDialog.SQalert({content: LogUtils.LOG_CMM_DATA_LOADING, SQ_type: "waitting"});
		var filePath= _modulePath; //之前无 '/'
		console.log("filePath ==="+filePath);

		var gridRows = lnkFileInfoCfgGrid.data.rows;
		var count = 1;
		var row ;
		for (var i = 0; i < gridRows.length; i++) {
			if (gridRows[i].cfgDtlCd == cfgDtlCd) {
				row = gridRows[i];
				break;
			}
		}
		for (var i = 0; i < gridRows.length; i++) {
			if (gridRows[i].cfgDtlCd == cfgDtlCd && StringUtils.isNotEmpty(gridRows[i].fileNm)) {
				count ++;
			}
		}
		if (row) {
			if (row.maxNum != 0 && row.maxNum < count) {
				$.ligerDialog.SQalert({content: row.datNm + "最多可上传" + row.maxNum + "份",
					SQ_showButtons: true,SQ_type: "warning",SQ_onBtnclick:function(){console.log(row.datNm + "最多可上传" + row.maxNum + "份")}});
				wait_dialog.close();
				return ;
			}
		} else {
			$.ligerDialog.SQalert({content: "请刷新页面重试!",
				SQ_showButtons: true,SQ_type: "warning",SQ_onBtnclick:function(){console.log("没有获取到行对象[row]")}});
			wait_dialog.close();
			return ;
		}

		$.ajaxFileUpload({
			url: '<%=path%>/system/sysulfilesrec/upload.do',
			secureuri: false,
			fileElementId: e.target.id,  //这里不在是以前的id了，要写成数组的形式！
			dataType: 'json',
			data: {filePath: filePath,costomerPath:_costomerPath,rootPath:_rootPath,uploadSysCd:_uploadSysCd},
			success: function (msg) {
				if (msg.success == 1) {
					//var row = lnkFileInfoCfgGrid.getRow(rowIndex);
					console.log(row);

					var uploadJOSN = JSON.parse(JSON.stringify(msg.data));
					console.log("uploadJOSN =s= " + JSON.stringify(uploadJOSN));
					for (var i=0; i< uploadJOSN.length; i++){
						var oldPath = "";
						oldPath = uploadJOSN[i].filePath;
						if (StringUtils.isEmpty(row.fileNm)) {
							lnkFileInfoCfgGrid.updateCell("filePath",oldPath,row.__index);
							lnkFileInfoCfgGrid.updateCell("fileNm",uploadJOSN[i].fileNm,row.__index);
							lnkFileInfoCfgGrid.updateCell("cfgDtlCd",cfgDtlCd,row.__index);
							lnkFileInfoCfgGrid.updateCell("crtTm",new Date(),row.__index);
						} else {
							var datNm = row.datNm;
							if (row.isMust == 1) {
								//datNm += '<span class="requiredSymbol">*</span>';
							}
							lnkFileInfoCfgGrid.addRow({
								audStsCd : 0,
								audStsCdNm : "未验证",
								cfgDtlCd : cfgDtlCd,
								datNm : datNm,
								isMust : row.isMust,
								filePath : oldPath,
								fileNm : uploadJOSN[i].fileNm,
								crtTm : new Date(),
							}, row, false)
						}
						uploadJOSN[i].cfgCd = _cfgCd ;
						uploadJOSN[i].cfgDtlCd = cfgDtlCd;
						uploadJOSN[i].orgCd = _cfgOrgCd;
						uploadJOSN[i].tabNm = _tabNm;
						uploadJOSN[i].sysCd = _cfgSysCd;
						upload_result_params.push(uploadJOSN[i]);
						console.log("upload_result_params =s= " + JSON.stringify(upload_result_params));
						console.log("file_btn_val => " + $('#fileup_' + cfgCd + '_' + cfgDtlCd).val());
						$('#fileup_' + cfgCd + '_' + cfgDtlCd).val('');
						console.log("file_btn_val => " + $('#fileup_' + cfgCd + '_' + cfgDtlCd).val());
					}
					wait_dialog.close();
				} else {
					wait_dialog.close();
					$.ligerDialog.SQalert({content: msg.info, SQ_type: "error"});
				}
			}
		});
	};

	//删除文件
	function delUpLoadindFile(event,rowIndex,cfgDtlCd){
		top.$.ligerDialog.confirm("确认删除吗?", function (flag) {
			if(!flag){
				return;
			}else{
				var wait_dialog;
				wait_dialog = $.ligerDialog.SQalert({content: LogUtils.LOG_CMM_DATA_LOADING, SQ_type: "waitting"});
				for (var i=0; i< upload_result_params.length; i++){
					if(upload_result_params[i].cfgDtlCd == cfgDtlCd){
						console.log("cfgDtlCd =j= " + cfgDtlCd);
						upload_result_params.splice(i,1);
						break;
					}
				}
				lnkFileInfoCfgGrid.updateCell("filePath",'',rowIndex);
				lnkFileInfoCfgGrid.updateCell("fileNm",'',rowIndex);
				lnkFileInfoCfgGrid.updateCell("crtTm",'',rowIndex);
				console.log("upload_result_params =k= " + JSON.stringify(upload_result_params));
				wait_dialog.close();
			}
		});
	}

	//删除文件
	function delUpLoadindFile2(event,rowIndex,cfgDtlCd){
		top.$.ligerDialog.confirm("确认删除吗?", function (flag) {
			if(!flag){
				return;
			}else{
				var wait_dialog;
				wait_dialog = $.ligerDialog.SQalert({content: LogUtils.LOG_CMM_DATA_LOADING, SQ_type: "waitting"});
				for (var i=0; i< upload_result_params2.length; i++){
					if(upload_result_params2[i].cfgDtlCd == cfgDtlCd){
						console.log("cfgDtlCd =j= " + cfgDtlCd);
						upload_result_params2.splice(i,1);
						break;
					}
				}
				propFileCfgGrid.updateCell("filePath",'',rowIndex);
				propFileCfgGrid.updateCell("fileNm",'',rowIndex);
				propFileCfgGrid.updateCell("crtTm",'',rowIndex);
				console.log("upload_result_params =k= " + JSON.stringify(upload_result_params2));
				wait_dialog.close();
			}
		});
	}

	//修改资料的验证状态
	function modifyAudStsCd(event,_fileId,_audStsCd){
		var wait_dialog;
		$.ajax({
			type: 'post',
			dataType: 'json',
			data: {'fileId':_fileId,'audStsCd':_audStsCd},
			url: '<%=path%>/product/splInfo/modifyFileAudStsCd.do',
			beforeSend: function () {
				wait_dialog = $.ligerDialog.SQalert({content: LogUtils.LOG_CMM_DATA_LOADING, SQ_type: "waitting"});
			},
			success: function (msg) {
				wait_dialog.close();
				if (msg.success == 1) {
					//$.ligerDialog.SQalert({content: msg.info, SQ_type: "success"});
					event.stopPropagation();
					var gridID = $(event.target).parents('.sq-grid').attr('ligeruiid');
					liger.get(gridID).reload();
				}else{
					$.ligerDialog.SQalert({content: msg.info, SQ_type: "error"});
				}
			}
		});
	}

	function downloadSplFileByUrl() {
		var data = lnkFileInfoCfgGrid.getData();
		//var files = [];
		var ids = [];
		for (var i = 0; i < data.length; i++) {
			var map = {};
			if(StringUtils.isNotEmpty(data[i].fileId)){
				ids.push(data[i].fileId);
			}
		}
		var actoinURL = '<%=path%>/system/sysulfilesrec/zipDownloadById.do?';
		var form = $("<form>");
		$('body').append(form);
		form.attr('style','display:none');
		form.attr('target','');
		form.attr('method','post');
		form.attr('action',actoinURL);//下载文件的请求路径
		var input = $('<input>');
		input.attr('type','hidden');
		input.attr('name','ids');
		input.attr('value',JSON.stringify(ids));
		form.append(input);
		form.submit();
	}

	//格式化时间
	function renderDate(rowdata, index, value) {
		var dateStr = "";
		if (null != value && ''!= value) {
			var date = new Date(value);
			dateStr = DateUtils.formatDate(date, DateUtils.YYYY_MM_DDHHMMSS);
		}
		return dateStr;
	}
	function disableFiled() {
        //liger.get("lnkCompNm").setDisabled(true);
        if (liger.get("bizLicNo")) {
            liger.get("bizLicNo").setDisabled(true);
        }
        //if (liger.get("succ")) {
            //liger.get("succ").setDisabled(true);
        //} 
        if (liger.get("taxRegNo")) {
            liger.get("taxRegNo").setDisabled(true);
        }
        /* if (liger.get("expDt")) {
            liger.get("expDt").setDisabled(true);
        } */

        /* if (liger.get("lnkCompNm")) {
            liger.get("lnkCompNm").setDisabled(true);
        } */
        if (liger.get("orgCode")) {
            liger.get("orgCode").setDisabled(true);
        }
        //if (liger.get("ownerCd")) {
            //liger.get("ownerCd").setDisabled(true);
        //}
        //if (liger.get("officeAddr")) {
            //liger.get("officeAddr").setDisabled(true);
        //}
        /* if (liger.get("majorBiz")) {
            liger.get("majorBiz").setDisabled(true);
        } */
        /* if (liger.get("compTyp")) {
            liger.get("compTyp").setDisabled(true);
        } */
        if (liger.get("bizLicNo")) {
            liger.get("bizLicNo").setDisabled(true);
        }
        /* if (liger.get("regAddr")) {
            liger.get("regAddr").setDisabled(true);
        } */
        /* if (liger.get("regDt")) {
            liger.get("regDt").setDisabled(true);
        } */
        if (liger.get("taxRegNo")) {
            liger.get("taxRegNo").setDisabled(true);
        }
        /* if (liger.get("bizScope")) {
            liger.get("bizScope").setDisabled(true);
        } */
        if (liger.get("corpRep")) {
            liger.get("corpRep").setDisabled(true);
        }
        if (liger.get("idNo")) {
            liger.get("idNo").setDisabled(true);
        }
        if (liger.get("totLnkQty")) {
            liger.get("totLnkQty").setDisabled(true);
        }
        if (liger.get("ownQty")) {
            liger.get("ownQty").setDisabled(true);
        }
        if (liger.get("ourTotLnkQyt")) {
            liger.get("ourTotLnkQyt").setDisabled(true);
        }
        if (liger.get("actCtrlNm")) {
            liger.get("actCtrlNm").setDisabled(true);
        }
        if (liger.get("actCtrlMp")) {
            liger.get("actCtrlMp").setDisabled(true);
        }
        if (liger.get("lnkNm")) {
            liger.get("lnkNm").setDisabled(true);
        }
        if (liger.get("lnkMp")) {
            liger.get("lnkMp").setDisabled(true);
        }
         if (liger.get("lnkPost")) {
            liger.get("lnkPost").setDisabled(true);
        }
        if(pageFlag == 1){
        	$("#rem").setDisabled_ligerTextarea(true);
        }
        if(_isShowRate == 1){
			if (liger.get("validTmStar")) {
				liger.get("validTmStar").setDisabled(true);
			}
			if (liger.get("validTmEnd")) {
				liger.get("validTmEnd").setDisabled(true);
			}
			if (liger.get("propCd")) {
				liger.get("propCd").setDisabled(true);
			}
		}
        if(isCheckVerify == 1){
			if (liger.get("roadBicycleRate")) {
				liger.get("roadBicycleRate").setDisabled(true);
			}
			if (liger.get("stopTruckRate")) {
				liger.get("stopTruckRate").setDisabled(true);
			}
		}
        //禁用省市
        //disabledRgnProvCd();
        //disabledRgnCityCd();
    }

    function uploadFileByUrl(_url,_name){
        if(SQ.regs.img.test(_name)){
            //SQ.imgPreview(_url);
            //SQ.imgPreview(_url, true);
            window.__ImgSrc = _url;
            window.__ImgTit = _name;
            window.open('<%=path%>/project/prjbscinfo/imgWinOpen.do', '', 'location=yes, width=800, height=600');
        }else{
            window.open(_url);
        }
    }

    function initStyle() {
        if (BuOrgCd == "00000005") {
            $("span[isShow='iscar']").each(function () {
                $("input[isShow='iscar']").each(function () {
                    $(this).attr("validate", "{required:true}");
                });
                $(this).show();
            });
            $("span[isShow='isother']").each(function () {
                $("input[isShow='isother']").each(function () {
                    $(this).attr("validate", "");
                });
                $(this).hide();
            });
            $("div[rlPsnDiv='zk'] div input").each(function () {
                $(this).attr("validate", "");
            });
            $("div[rlPsnDiv='zk']").each(function () {
                $(this).hide();
            });
        } else {
            $("span[isShow='iscar']").each(function () {
                $("input[isShow='iscar']").each(function () {
                    $(this).attr("validate", "");
                });
                $(this).hide();
            });
            $("span[isShow='isother']").each(function () {
                $("input[isShow='isother']").each(function () {
                    $(this).attr("validate", "{required:true}");
                });
                $(this).show();
            });
        }
        if (BuOrgCd != "00000005") {
            if (audStsCd == FlowConstant.FLOW_CHECK_STATE_PASS) {
                $("#prj_lnk_comp_form div div div input").each(function () {
                    $(this).attr("readonly", "readonly");
                });
                $("#fileDetail").hide();
            } else {
                $("div[rlPsnDiv='zk']").each(function () {
                    $(this).hide();
                });
            }
            $("div[rlPsnDiv='zk'] div input").each(function () {
                $(this).attr("validate", "");
            });
            var compId = $("#lnkCompId").val();
        }
        $("#psnDiv").show();

		var _suppLnkPrjTypCdListJson = ${suppLnkPrjTypCdListJson};
		$("#suppLnkPrjTypCd").ligerComboBox({ isShowCheckBox: true, isMultiSelect: true,
			data: _suppLnkPrjTypCdListJson,
			valueField: 'key',
			textField:'value'
		});
		var _propCdListJson = ${propCdListJson};
		$("#propCd").ligerComboBox({ isShowCheckBox: true, isMultiSelect: true,
			data: _propCdListJson,
			valueField: 'key',
			textField:'value'
		});
    }

    var pageInTab = null;
    var loadedTabs = []

    //初始化数据
    function initData() {

        setFormatDateValue();
        setFormatRgnValue();
        var prj_lnk_comp_form = $("#prj_lnk_comp_form").ligerForm({
            validate: true,
            onAfterSetFields: function () {
                this.CACHED_INIT_VALUES = getFormValues(this.id)
            }
        });
        prj_lnk_comp_form.setFieldValidate("rgnProvCd", {
            //required: true,
            select: false
        });
        prj_lnk_comp_form.setFieldValidate("rgnCityCd", {
            //required: true,
            select: false
        });
        var id = $("#lnkCompId").val();
        if (!id) {
            var baseForm1 = liger.get("prj_lnk_comp_form");
            baseForm1.setData({
                ownerCd: ProjectConstant.CODE_OWNER_CD,
                isUploadLoa:'${prjLnkComp.isUploadLoa}',
                isRecycleLoa:'${prjLnkComp.isRecycleLoa}'
            });
            //设置公司归属默认为第三方
        }
        var _isUploadLoa = '${prjLnkComp.isUploadLoa}';
    	var _isRecycleLoa = '${prjLnkComp.isRecycleLoa}' ;
    	var form = liger.get("prj_lnk_comp_form");
    	if(_isUploadLoa){
    		form.setData({
        		isUploadLoa:_isUploadLoa,
        	})
    	}
    	if(_isRecycleLoa){
    		form.setData({
        		isRecycleLoa:_isRecycleLoa
        	})
    	}
        initTab();
        if (BuOrgCd != "00000005") {
            if (audStsCd == FlowConstant.FLOW_CHECK_STATE_PASS) {
                liger.get("regDt").setDisabled(true);
                liger.get("expDt").setDisabled(true);
                liger.get("ownerCd").setDisabled(true);
                $("#rem").setDisabled_ligerTextarea(true);
            }
            pageInTab.removeTabItem("tabC");
        } else {
            pageInTab.removeTabItem("tabD");
        }

		var suppLnkPrjTypCd = '${prjLnkComp.suppPrjTypCd}';
		console.log(suppLnkPrjTypCd);
		if (suppLnkPrjTypCd) {
			$("#suppLnkPrjTypCd").ligerGetComboBoxManager().selectValue(suppLnkPrjTypCd);
			$("#suppLnkPrjTypCd").ligerGetComboBoxManager().updateStyle();
		}
		var propCdStr = '${prjLnkComp.propCd}';
		if(propCdStr){
			$("#propCd").ligerGetComboBoxManager().selectValue(propCdStr);
			$("#propCd").ligerGetComboBoxManager().updateStyle();
		}
		//项目发起人信息
        $("#startPrjCstMgrNm").html('${prjLnkComp.startPrjCstMgrNm}');
        $("#startPrjCstMgrTel").html('${prjLnkComp.startPrjCstMgrTel}');
        $("#startPrjCstMgrOrgCdNm").html('${prjLnkComp.startPrjCstMgrOrgNm}');
    }

    //初始化Tab
    function initTab() {
        pageInTab = $("#pageInTab").ligerTab({
            height: 'auto',
            contextmenu: false,
            minIframeHeight: GET_minIframeHeight(),
            onBeforeSelectTabItem: function (tabid) {
                var lnkCompId = $("#lnkCompId").val();
                if (tabid != "tabA") {
                    if (lnkCompId == null || lnkCompId == '') {
                        top.$.ligerDialog.SQalert({content: LogUtils.LOG_LNK_COMP_SELECT_BEFORE, SQ_type: "warning"});
                        return false;
                    }
                }
            },
            onAfterSelectTabItem: function (tabid) {
                //   if (loadedTabs.indexOf(tabid)<0) {
                var lnkCompId = $("#lnkCompId").val();
                if (tabid != "tabA") {
                    if (lnkCompId == null || lnkCompId == '') {
                        top.$.ligerDialog.SQalert({content: LogUtils.LOG_LNK_COMP_SELECT_BEFORE, SQ_type: "warning"});
                        return false; //验证不通过，不执行以下代码
                    }
                }
                loadedTabs.push(tabid);
                switch (tabid) {
                    case "tabB":
                        pageInTab.setTabItemSrc(tabid, "<%=path%>/project/prjbscinfo/toPrjBscInfoListPage.do?lnkCompId=" + lnkCompId + "&&isLnkCompFlag=1");
                        break;
                    case "tabC":
                        pageInTab.setTabItemSrc(tabid, "<%=path%>/project/prjLnkCompBkAcc/toListPage.do?compId=" + lnkCompId);
                        break;
                    case "tabD":
                        pageInTab.setTabItemSrc(tabid, "<%=path%>/project/prjLnkCompCrLim/toListPage.do?compId=" + lnkCompId);
                        break;
					case "tabE":
						pageInTab.setTabItemSrc(tabid, "<%=path%>/customer/cstManualRelation/toListPage.do?Id=" + lnkCompId +"&useType=3&cstType=2");
						break;
					case "tabG":
						pageInTab.setTabItemSrc(tabid, "<%=path%>/project/prjlnkcomp/toOldFilesListPage.do?id=" + lnkCompId);
						break;
					case "tabH":
						var lnkCompId = $("#lnkCompId").val();
						pageInTab.setTabItemSrc(tabid, "<%=path%>/project/prjLnkCompApply/prjCompApplyProcessPage.do?linkId=" + lnkCompId + "&&isLnkCompFlag=0" + "&isLnkPrjViewFlag=1");
                        break;
                }
                //     };
                SetIframe_height();
            }
        });

        $.extend(true, pageInApp, {
            pageInTab: pageInTab
        });
    };

    //设置日期值
    function setFormatDateValue() {
        var regDt = $("#regDt").val();
        var expDt = $("#expDt").val();
        if (expDt) {
            var expDate = DateUtils.formatDate(new Date(expDt), DateUtils.YYYY_MM_DD);
            $("#expDt").val(expDate);//道路运输许可证有效期
        }
        if (regDt) {
            var regDate = DateUtils.formatDate(new Date(regDt), DateUtils.YYYY_MM_DD);
            $("#regDt").val(regDate);//注册日期
        }

    }

    function setFormatRgnValue() {
        rgnPrCd = '${prjLnkComp.rgnPrCd}';
        rgnCyCd = '${prjLnkComp.rgnCyCd}';
        //alert(rgnPrCd)
        setRgnProvCdUpdataValue(rgnPrCd);
        setRgnCityCdUpdataValue(rgnCyCd);
        setRegionSelectDataChange();
    }

    //检查是否重名
    function checkPrjLnkCompNm() {
        var flag = false;
        var lnkCompNm = $("#lnkCompNm").val();
        var url = '<%=path%>/project/prjlnkcomp/checkPrjLnkCompNm.do';
        var data = {};
        data.lnkCompNm = lnkCompNm;
        if (lnkCompNm) {
            $.ajax({
                type: 'get',
                dataType: 'json',
                data: data,
                url: url,
                success: function (msg) {
                    if (msg.success == 1) {
                        if (msg.data) {
                            top.$.ligerDialog.SQalert({content: "该挂靠公司已经存在", SQ_type: "error"});
                            flag = true;
                        }
                    }
                }
            });
        }
        return flag;
    }

    //取消
    function cancelBtn() {
        var TAB = top.mainApp.parentTab;
        var currentTabid = TAB.getSelectedTabItemID();
        top.tab.removeTabItem(currentTabid);
    }

	function lnkwsCheck() {
		var ligerForm = liger.get("prj_lnk_comp_form");
		var rlPsnData = rlPsnGrid.getData();
		var _data = ligerForm.getData();
		_data["rlPsnList"] = JSON.stringify(rlPsnData);

		var _url = '<%=path%>/project/prjlnkcomp/kingDeeWsCheckLnk.do';

		$.ajax({
			type: 'post',
			url: _url,
			data: _data,
			dataType: "json",
			success: function (msg) {
				if ( 0 == msg.success) {
					$.ligerDialog.SQalert({content:msg.info, SQ_type: "error"});
					return false;
				}else if( 1 == msg.success ){
					save();
				}
			}
		});
	}


    function save() {
        var ligerForm = liger.get("prj_lnk_comp_form");
        if (!ligerForm.valid()) {
            top.$.ligerDialog.SQalert({content: LogUtils.LOG_CMM_MUST_FIX_ITEM_INFO, SQ_type: "warning"});
            return false; //验证不通过，不执行以下代码
        }
        var rlPsnData = rlPsnGrid.getData();
        var lnkCompNm = $("#lnkCompNm").val();
        var lnkCompId = $("#lnkCompId").val();
        if (lnkCompId) {
            var data = ligerForm.getData();
            data["regDt"] = $("#regDt").val();
            data["expDt"] = $("#expDt").val();
            data["isUploadLoa"] = $("#isUploadLoa").val();
            data["isRecycleLoa"] = $("#isRecycleLoa").val();
            //event.preventDefault();

            var fileParams = upload_result_params;//getUploadResultParams();//获取附件上传的信息
			var checkFilesResult = checkFiles(fileParams);
			if (checkFilesResult != 1) {
				top.$.ligerDialog.SQalert({content: checkFilesResult, SQ_type: "warning"});
				return false;
			}
            data["fileParams"] = JSON.stringify(fileParams);
            if(deleteFileIdS){
				var deleteFileIdStr = deleteFileIdS.toString();
            	data["removeFileIds"] =  deleteFileIdStr;
            }
            //  if(BuOrgCd!=ProjectConstant.CODE_BU_ORG_CD_CAR){
            var isValid = SQ.validGrid('ligergrid_psn');
            if (isValid == false) {
                UIUtils.alertError("请正确填写！");
                return false;
            }
            ;
            data["rlPsnList"] = JSON.stringify(rlPsnData);
            //  }
            var url = '<%=path%>/project/prjLnkCompApply/addPrjLnkComp.do?flag=' + 'flag';
            var lnkCompId = $("#lnkCompId").val();
            data["lnkCompId"] = lnkCompId;

            //区域信息
            data["rgnPrCd"] = getRgnProvCd();//获取省代码
            data["rgnCyCd"] = getRgnCityCd();//获取市代码

            var wait_dialog;
            $.ajax({
                type: 'post',
                dataType: 'json',
                data: data,
                url: url,
                beforeSend: function () {
                    wait_dialog = $.ligerDialog.SQalert({content: LogUtils.LOG_CMM_DATA_LOADING, SQ_type: "waitting"});
                },
                success: function (msg) {
                    wait_dialog.close();
                    if (msg.success == 1) {
                        top.$.ligerDialog.SQalert({content: msg.info, SQ_type: "success"});
                        if (!isFlow) {
                            var TAB = top.mainApp.parentTab;
                            var currentTabid = TAB.getSelectedTabItemID();
                            var currFrameElement = top.$("#" + currentTabid).get(0);
                            rlPsnGrid.reload();
                            //lnkFileInfoCfgGrid.reload();
                            
                            //var callback = currFrameElement.W2W.callback;
                            //callback();
                            //top.tab.removeTabItem(currentTabid);
                        }
                    } else {
                        top.$.ligerDialog.SQalert({content: msg.info, SQ_type: "error"});
                    }
                }
            });
        }
        <%--  else {
                    var url = '<%=path%>/project/prjlnkcomp/checkPrjLnkCompNm.do';
                    var data = {};
                    data.lnkCompNm = lnkCompNm;
                    $.ajax({
                        type: 'get',
                        dataType: 'json',
                        data: data,
                        url: url,
                        success: function (msg) {
                            if (msg.success == 1) {
                                if (msg.data) {
                                    top.$.ligerDialog.SQalert({content: "该挂靠公司已经存在", SQ_type: "error"});
                                    return false;
                                }
                            } else {
                                var data = ligerForm.getData();
                                data["regDt"] = $("#regDt").val();
                                data["expDt"] = $("#expDt").val();

                                var fileParams = getUploadResultParams();//获取附件上传的信息
                                data["fileParams"] = JSON.stringify(fileParams);
                                //   if(BuOrgCd==ProjectConstant.CODE_BU_ORG_CD_ZK){
                                var isValid = SQ.validGrid('ligergrid_psn');
                                if (isValid == false) {
                                    UIUtils.alertError("请正确填写！");
                                    return false;
                                }
                                ;
                                data["rlPsnList"] = JSON.stringify(rlPsnData);
                                //  }
                                var url = '<%=path%>/project/prjlnkcomp/addPrjLnkComp.do';
                                var lnkCompId = $("#lnkCompId").val();
                                data["lnkCompId"] = lnkCompId;
                                var wait_dialog;
                                $.ajax({
                                    type: 'post',
                                    dataType: 'json',
                                    data: data,
                                    url: url,
                                    beforeSend: function () {
                                        wait_dialog = $.ligerDialog.SQalert({
                                            content: LogUtils.LOG_CMM_DATA_LOADING,
                                            SQ_type: "waitting"
                                        });
                                    },
                                    success: function (msg) {
                                        wait_dialog.close();
                                        if (msg.success == 1) {
                                            $("#lnkCompId").val(msg.data);
                                            top.$.ligerDialog.SQalert({content: msg.info, SQ_type: "success"});
                                            var TAB = top.mainApp.parentTab;
                                            var currentTabid = TAB.getSelectedTabItemID();
                                            var currFrameElement = top.$("#" + currentTabid).get(0);
                                            var callback = currFrameElement.W2W.callback;
                                            callback();
                                            top.tab.removeTabItem(currentTabid);

                                        } else {
                                            top.$.ligerDialog.SQalert({content: msg.info, SQ_type: "error"});
                                        }
                                    }
                                });
                            }
                        }
                    });

                } --%>
    }

	function checkFiles(fileParams) {
		if (fileParams.length <= 0){
			return "请上传附件信息";
		}
		var rows = lnkFileInfoCfgGrid.data.rows;
		var count = {};
		for (var i = 0; i < rows.length; i++) {
			if (rows[i].isMust == 1 && StringUtils.isEmpty(rows[i].fileNm)){
				return "请上传" + rows[i].datNm;
			}
			if (rows[i].maxNum != 0 && rows[i].__status != 'delete'){
				if(count[rows[i].cfgDtlCd]){
					count[rows[i].cfgDtlCd] += 1;
				} else {
					count[rows[i].cfgDtlCd] = 1;
				}
			}
		}
		for (var i = 0; i < rows.length; i++) {
			if (rows[i].maxNum != 0) {
				if (rows[i].maxNum < count[rows[i].cfgDtlCd]) {
					return rows[i].datNm + "不得多于" + rows[i].maxNum + "张";
				}
			}
		}
		return 1;
	}

    //发起审核流程
    function startSqlAdmissionFlow() {
        var modelTyp = FlowConstant.FLOW_MODEL_TYP_LNK_CHG;//流程业务分类-供应商准入
        if (StringUtils.isEmpty(modelTyp)) {
            return;
        }
        var flowDialog = $.ligerDialog.SQopen({
            url: '<%=path%>/flow/flow/toForStartListPage.do?modelTyp=' + modelTyp,
            width: 700,
            height: 400,
            title: '请选择要发起的流程',
            buttons: [{
                text: "确定", type: 'ok', cls: 'l-dialog-btn-ok',
                onclick: function (item, Dialog) {
                    if (Dialog.onOk) {
                        $.ligerDialog.SQconfirm('是否确定发起变更流程?', function (flag) {
                            if (flag == false) {
                                return;
                            } else {
                                Dialog.onOk();
                            }
                        })
                    }
                }
            }, {
                text: "取消", type: 'cancel', cls: 'l-dialog-btn-no',
                onclick: function (item, Dialog) {
                    if (Dialog.onCancel) Dialog.onCancel();
                }
            }
            ],
            onClose: function () {
                var json = flowDialog._DATA;
                if (!json) {
                    return;
                }
                saveApplyInfo(json);
            }
        });
    }

    /**
     * 调用挂靠公司保存事件
     * @param strJsons
     * @returns {boolean}
     */
    function saveApplyInfo(strJsons) {

        var ligerForm = liger.get("prj_lnk_comp_form");
        if (!ligerForm.valid()) {
            top.$.ligerDialog.SQalert({content: LogUtils.LOG_CMM_MUST_FIX_ITEM_INFO, SQ_type: "warning"});
            return false; //验证不通过，不执行以下代码
        }
        var rlPsnData = rlPsnGrid.getData();
        var lnkCompNm = $("#lnkCompNm").val();
        var lnkCompId = $("#lnkCompId").val();
        var url = '<%=path%>/project/prjlnkcomp/checkPrjLnkCompNm.do';
        var data = {};
        data.lnkCompNm = lnkCompNm;


        $.ajax({
            type: 'get',
            dataType: 'json',
            data: data,
            url: url,
            success: function (msg) {
                /* if (StringUtils.isNotEmpty(strJsons)) {
                    parent.$.ligerDialog.SQalert({content: msg.info, SQ_type: "success"});
                    Remove_navTab();
                }  */

                if (msg.success == 1) {
                    if (msg.data) {
                        top.$.ligerDialog.SQalert({content: "成功", SQ_type: "error"});
                        return false;
                    }
                } else {
                    var data = ligerForm.getData();
                    data["regDt"] = $("#regDt").val();
                    data["expDt"] = $("#expDt").val();

                    if (StringUtils.isNotEmpty(strJsons)) {
                        data["procDefKey"] = strJsons.procDefKey;
                        data["procDefId"] = strJsons.procDefId;
                        data["procNo"] = strJsons.procNo;
                    }

                    var fileParams = upload_result_params;//getUploadResultParams();//获取附件上传的信息
                    data["fileParams"] = JSON.stringify(fileParams);
                    //   if(BuOrgCd==ProjectConstant.CODE_BU_ORG_CD_ZK){
                    var isValid = SQ.validGrid('ligergrid_psn');
                    if (isValid == false) {
                        UIUtils.alertError("请正确填写！");
                        return false;
                    }
                    ;
                    data["rlPsnList"] = JSON.stringify(rlPsnData);
                    //  }
                    var url = '<%=path%>/ project/prjLnkCompApply/addPrjLnkComp.do';
                    var lnkCompId = $("#lnkCompId").val();
                    data["lnkCompId"] = lnkCompId;
                    var wait_dialog;
                    $.ajax({
                        type: 'post',
                        dataType: 'json',
                        data: data,
                        url: url,
                        beforeSend: function () {
                            wait_dialog = $.ligerDialog.SQalert({
                                content: LogUtils.LOG_CMM_DATA_LOADING,
                                SQ_type: "waitting"
                            });
                        },
                        success: function (msg) {
                            wait_dialog.close();
                            if (msg.success == 1) {
                                $("#lnkCompId").val(msg.data);
                                top.$.ligerDialog.SQalert({content: msg.info, SQ_type: "success"});
                                var TAB = top.mainApp.parentTab;
                                var currentTabid = TAB.getSelectedTabItemID();
                                var currFrameElement = top.$("#" + currentTabid).get(0);
                                var callback = currFrameElement.W2W.callback;
                                callback();
                                top.tab.removeTabItem(currentTabid);

                            } else {
                                top.$.ligerDialog.SQalert({content: msg.info, SQ_type: "error"});
                            }
                        }
                    });
                }
            }
        });
    }
	//信审页面联系人
	    function initRlPsnAudGrid() {
        var _compId = ${lnkCompId};
        var _applyId =
        ${applyId}
        var _audStsCd = 1
        rlPsnGrid = $("#ligergrid_psn").ligerGrid({
            usePager: false,
            url: '<%=path%>/project/prjLnkCompApply/initRlPsnList.do?compId=' + _compId + '&compApplyId=' + _applyId,
            method: 'get',
            columns: [
                {
                    display: '姓名(<span class="c_red">*</span>)', name: 'rlNm', minWidth: 60, editor: {type: 'text'},
                    validate: function (value, rowData, col) {
                        //if (StringUtils.isEmpty(value) && CollectionUtils.isNotEmpty(mustAddRlPsnJSON) && mustAddRlPsnJSON.indexOf(rowData.rlTypCd) >= 0) return "此项为必填项！";
                        if (StringUtils.isEmpty(value)) return "此项为必填项！";
                    }
                },
                {
                    display: '联系人类型(<span class="c_red">*</span>)', name: 'rlTypCdNm', minWidth: 60,
                    editor: {
                        type: 'select',
                        data: rlRsnTypListJSON,
                        valueField: 'key',
                        textField: 'value'
                    },
                    valueField: 'rlTypCd',
                    textField: 'rlTypCdNm',
                    render: function (item) {
                        return item.rlTypCdNm;
                    },
                    validate: function (value, rowData, col) {
                        //if (StringUtils.isEmpty(value) && CollectionUtils.isNotEmpty(mustAddRlPsnJSON) && mustAddRlPsnJSON.indexOf(rowData.rlTypCd) >= 0) return "此项为必填项！";
                        if (StringUtils.isEmpty(value)) return "此项为必填项！";
                    }
                },
                {display: '股比',name:'stockRatio',width:100},
                {
                    display: '证件类型', name: 'certTypCdNm', minWidth: 60,
                    editor: {
                        type: 'select',
                        data: certTypCdList,
                        valueField: 'key',
                        textField: 'value'
                    },
                    valueField: 'certTypCd',
                    textField: 'certTypCdNm',
                    render: function (item) {
                        return item.certTypCdNm;
                    },
                    validate: function (value, rowData, col) {
                        //if (StringUtils.isEmpty(value) && CollectionUtils.isNotEmpty(mustAddRlPsnJSON) && mustAddRlPsnJSON.indexOf(rowData.rlTypCd) >= 0) return "此项为必填项！";
                        if (StringUtils.isEmpty(value)) return "此项为必填项！";
                    }
                },
                {
                    display: '证件号码',
                    name: 'certNo',
                    width: 140,
                    //align: 'left',
                    editor: {type: 'text'},
                    render: function (value,rowData) {
                        if(StringUtils.isEmpty(value.certNo) && StringUtils.isNotEmpty(value.rlTypCd)){
                            if(noAddRlPsnJSON.indexOf(value.rlTypCd) >= 0){
                                return '<span class="c_gray">(非必填信息)</span>';
                            }else{
                                return '<span class="c_gray">(必填信息)</span>';
                            }
                        }
                        return value.certNo;
                    },
                    validate: function (value, rowData, col) {
                        //if (StringUtils.isEmpty(value) && CollectionUtils.isNotEmpty(mustAddRlPsnJSON) && mustAddRlPsnJSON.indexOf(rowData.rlTypCd) >= 0) return "此项为必填项！";
                        if (StringUtils.isEmpty(value)){
                            if((CollectionUtils.isEmpty(noAddRlPsnJSON)) || (CollectionUtils.isNotEmpty(noAddRlPsnJSON) && noAddRlPsnJSON.indexOf(rowData.rlTypCd) < 0)){
                                return "此项为必填项！";
                            }
                        }
                    }
                },
                {
                    display: '联系电话',
                    name: 'tel',
                    width: 100,
                    //align: 'left',
                    editor: {type: 'text'},
                    render: function (value,rowData) {
                        if(StringUtils.isEmpty(value.tel) && StringUtils.isNotEmpty(value.rlTypCd)){
                            if(noAddRlPsnJSON.indexOf(value.rlTypCd) >= 0){
                                return '<span class="c_gray">(非必填信息)</span>';
                            }else{
                                return '<span class="c_gray">(必填信息)</span>';
                            }
                        }
                        return value.tel;
                    },
                    validate: function (value, rowData, col) {
                        //if (StringUtils.isEmpty(value) && CollectionUtils.isNotEmpty(mustAddRlPsnJSON) && mustAddRlPsnJSON.indexOf(rowData.rlTypCd) >= 0) return "此项为必填项！";
                        if (StringUtils.isEmpty(value)){
                            if((CollectionUtils.isEmpty(noAddRlPsnJSON)) || (CollectionUtils.isNotEmpty(noAddRlPsnJSON) && noAddRlPsnJSON.indexOf(rowData.rlTypCd) < 0)){
                                return "此项为必填项！";
                            }
                        }
                    }
                },
                {display: '备注', name: 'rlRem', minWidth: 140, editor: {type: 'text'}},
                {
                    display: '工商信息校验', name: 'checkVerify', minWidth: 150,
                    render: function (rowdata, rowindex, value) {
                        var h = "";
                        if (_audStsCd == 1) {
                            if (rowdata.busInfoVerify == 2 || rowdata.busInfoVerify == null && rowdata.id != null) {
                                //h += "<a  href = "javascript:checkRlPsn('Verify',\''+rowdata.id+'\',\''+rowdata.rlNm+'\',\''+rowdata.certNo+'\',\''+rowdata.tel+'\');" class = "sq-button sq-button-round">验证</a>"

                                h += '<a class="sq-button sq-button-round" href="javascript:checkRlPsn(1,' + rowdata.id + ',' + rowdata.applyRlPsnId + ',\'' + rowdata.rlNm + '\',\'' + rowdata.certNo + '\',\'' + rowdata.tel + '\',\'' + rowdata.rlTypCd + '\');">验证</a>'
                            } else {
                                h += '<div class="sq-button sq-button-round disabled">已校验</div>'
                            }
                            /* if(rowdata.busInfoVerify != 1){
                                h+= '<a class="sq-button sq-button-round" href="javascript:checkRlPsn(1,\''+rowdata.id+'\',\''+rowdata.rlNm+'\',\''+rowdata.certNo+'\',\''+rowdata.tel+'\',\''+rowdata.rlTypCd+'\');">验证</a>'
                            }else{
                                h +='<div class="sq-button sq-button-round disabled">已校验</div>'
                            } */
                        }
                        return h;
                    }
                },
                {
                    display: '工商信息校验结果', name: 'busInfoVerify', minWidth: 150,
                    render: function (rowdata, rowindex, value) {
                        if (rowdata.busInfoVerify == 1) {
                            return "一致";
                        } else if (rowdata.busInfoVerify == -1) {
                            return "不一致";
                        } else if (rowdata.busInfoVerify == 0) {
                            return "未查得";
                        } else {
                            return "";
                        }
                    }
                },
                {
                    display: '三要素校验（机构1）', name: 'PYCheck', minWidth: 150,
                    render: function (rowdata, rowindex, value) {

                        var h = "";
                        if (_audStsCd == 1) {
                            if (rowdata.pyPerVerify == 2 || rowdata.pyPerVerify == null && rowdata.id != null) {
                                //h += "<a  href = "javascript:checkRlPsn('Verify',\''+rowdata.id+'\',\''+rowdata.rlNm+'\',\''+rowdata.certNo+'\',\''+rowdata.tel+'\');" class = "sq-button sq-button-round">验证</a>"

                                h += '<a class="sq-button sq-button-round" href="javascript:checkRlPsn(2,' + rowdata.id + ',' + rowdata.applyRlPsnId + ',\'' + rowdata.rlNm + '\',\'' + rowdata.certNo + '\',\'' + rowdata.tel + '\',\'' + rowdata.rlTypCd + '\');">验证</a>'
                            } else {
                                h += '<div class="sq-button sq-button-round disabled">已校验</div>'
                            }
                            /* if(rowdata.pyPerVerify != 1){
                                h+= '<a class="sq-button sq-button-round" href="javascript:checkRlPsn(2,\''+rowdata.id+'\',\''+rowdata.rlNm+'\',\''+rowdata.certNo+'\',\''+rowdata.tel+'\',\''+rowdata.rlTypCd+'\');">验证</a>'
                            }else{
                                h+='<div class="sq-button sq-button-round disabled">已校验</div>'
                            } */
                        }
                        return h;
                    }
                },
                {
                    display: '三要素校验结果1', name: 'pyPerVerify', minWidth: 150,
                    render: function (rowdata, rowindex, value) {
                        if (rowdata.pyPerVerify == 1) {
                            return "一致";
                        } else if (rowdata.pyPerVerify == -1) {
                            return "不一致";
                        } else if (rowdata.pyPerVerify == 0) {
                            return "未查得";
                        } else {
                            return "";
                        }
                    }
                },
                {
                    display: '三要素校验（机构2）', name: 'TDCheck', minWidth: 150,
                    render: function (rowdata, rowindex, value) {
                        var h = "";
                        if (_audStsCd == 1) {
                            if (rowdata.tdPerVerify == 2 || rowdata.tdPerVerify == null && rowdata.id != null) {
                                //h += "<a  href = "javascript:checkRlPsn('Verify',\''+rowdata.id+'\',\''+rowdata.rlNm+'\',\''+rowdata.certNo+'\',\''+rowdata.tel+'\');" class = "sq-button sq-button-round">验证</a>"

                                h += '<a class="sq-button sq-button-round" href="javascript:checkRlPsn(3,' + rowdata.id + ',' + rowdata.applyRlPsnId + ',\'' + rowdata.rlNm + '\',\'' + rowdata.certNo + '\',\'' + rowdata.tel + '\',\'' + rowdata.rlTypCd + '\');">验证</a>'
                            } else {
                                h += '<div class="sq-button sq-button-round disabled">已校验</div>'
                            }
                            /* if(rowdata.tdPerVerify != 1){
                                h+= '<a class="sq-button sq-button-round" href="javascript:checkRlPsn(3,\''+rowdata.id+'\',\''+rowdata.rlNm+'\',\''+rowdata.certNo+'\',\''+rowdata.tel+'\',\''+rowdata.rlTypCd+'\');">验证</a>'
                            }else{
                                h +='<div class="sq-button sq-button-round disabled">已校验</div>'
                            } */
                        }
                        return h;
                    }
                },
                {
                    display: '三要素校验结果2', name: 'tdPerVerify', minWidth: 150,
                    render: function (rowdata, rowindex, value) {
                        if (rowdata.tdPerVerify == 1) {
                            return "一致";
                        } else if (rowdata.tdPerVerify == -1) {
                            return "不一致";
                        } else if (rowdata.tdPerVerify == 0) {
                            return "未查得";
                        } else {
                            return "";
                        }
                    }
                },
                {
                    display: '三要素校验（机构3）', name: 'BRCheck', minWidth: 150,
                    render: function (rowdata, rowindex, value) {
                        var h = "";
                        if (_audStsCd == 1) {
                            if (rowdata.brPerVerify == 2 || rowdata.brPerVerify == null && rowdata.id != null) {
                                //h += "<a  href = "javascript:checkRlPsn('Verify',\''+rowdata.id+'\',\''+rowdata.rlNm+'\',\''+rowdata.certNo+'\',\''+rowdata.tel+'\');" class = "sq-button sq-button-round">验证</a>"
                                h += '<a class="sq-button sq-button-round" href="javascript:checkRlPsn(4,' + rowdata.id + ',' + rowdata.applyRlPsnId + ',\'' + rowdata.rlNm + '\',\'' + rowdata.certNo + '\',\'' + rowdata.tel + '\',\'' + rowdata.rlTypCd + '\');">验证</a>'
                            } else {
                                h += '<input class="sq-button sq-button-round disabled" type="button" value="已校验" disabled>'
                            }
                            /* if(rowdata.brPerVerify != 1){
                                h+= '<a class="sq-button sq-button-round" href="javascript:checkRlPsn(4,\''+rowdata.id+'\',\''+rowdata.rlNm+'\',\''+rowdata.certNo+'\',\''+rowdata.tel+'\',\''+rowdata.rlTypCd+'\');">验证</a>'
                            }else{
                                h +='<input class="sq-button sq-button-round disabled" type="button" value="已校验" disabled>'
                            } */

                        }
                        return h;
                    }
                },
                {
                    display: '三要素校验结果3', name: 'brPerVerify', minWidth: 150,
                    render: function (rowdata, rowindex, value) {
                        if (rowdata.brPerVerify == 1) {
                            return "一致";
                        } else if (rowdata.brPerVerify == -1) {
                            return "不一致";
                        } else if (rowdata.brPerVerify == 0) {
                            return "未查得";
                        } else {
                            return "";
                        }
                    }
                },
                // getOptColumn()
            ],
            onBeforeSubmitEdit: function (e) {//重新赋值,要不然选中后离开会把key显示在前端
                if (e.selected && e.column.columnname == "certTypCdNm") {
                    e.record.certTypCdId = e.value;
                    e.value = e.selected[e.column.editor.textField];
                    e.record.certTypCd = e.record.certTypCdId;
                }
                if (e.selected && e.column.columnname == "rlTypCdNm") {
                    e.record.rlTypCdId = e.value;
                    e.value = e.selected[e.column.editor.textField];
                    e.record.rlTypCd = e.record.rlTypCdId;
                }
            },
            onBeforeEdit: function (e) {
                var strIsDefault = e.record.isDefault;
                var colName = e.column.columnname;
                e.column.editor.readonly = true;
                /*  if (StringUtils.isNotEmpty(strIsDefault) && strIsDefault == 1) {
                     if (colName == 'rlTypCdNm' || colName == 'certTypCdNm'|| colName == 'rlNm'
                    	 || colName == 'certNo'|| colName == 'tel') {
                         e.column.editor.readonly = true;
                     } else {
                         e.column.editor.readonly = false;
                     }
                 } else {
                     e.column.editor.readonly = false;
                 } */
            },
            pageSize: 100,
            root: 'rows',
            record: 'total',
            hideLoadButton: true,
            heightDiff: -2,
            checkbox: false,
            enabledEdit: true,
            allowUnSelectRow: true,
            alternatingRow: false,
            rownumbers: true,
            enabledSort: false,
            usePagerOnLessPagesize: false,
            onAfterShowData: function (currentData) {
                this.CACHED_DATA = JSON.parse(JSON.stringify(currentData))
            }
        });
        rlPsnGrid.setHeight(200);
    }

     //呈报人页面联系人
    function initRlPsnGrid() {
        var _compId = ${lnkCompId};
        var _applyId =
        ${applyId}
        var _audStsCd = 1
        rlPsnGrid = $("#ligergrid_psn").ligerGrid({
            usePager: false,
            url: '<%=path%>/project/prjLnkCompApply/initRlPsnList.do?compId=' + _compId + '&compApplyId=' + _applyId,
            method: 'get',
            columns: [
                {
                    display: '姓名(<span class="c_red">*</span>)', name: 'rlNm', minWidth: 60, editor: {type: 'text'},
                    validate: function (value, rowData, col) {
                        //if (StringUtils.isEmpty(value) && CollectionUtils.isNotEmpty(mustAddRlPsnJSON) && mustAddRlPsnJSON.indexOf(rowData.rlTypCd) >= 0) return "此项为必填项！";
                        if (StringUtils.isEmpty(value)) return "此项为必填项！";
                    }
                },
                {
                    display: '联系人类型(<span class="c_red">*</span>)', name: 'rlTypCdNm', minWidth: 60,
                    editor: {
                        type: 'select',
                        data: rlRsnTypListJSON,
                        valueField: 'key',
                        textField: 'value'
                    },
                    valueField: 'rlTypCd',
                    textField: 'rlTypCdNm',
                    render: function (item) {
                        return item.rlTypCdNm;
                    },
                    validate: function (value, rowData, col) {
                        //if (StringUtils.isEmpty(value) && CollectionUtils.isNotEmpty(mustAddRlPsnJSON) && mustAddRlPsnJSON.indexOf(rowData.rlTypCd) >= 0) return "此项为必填项！";
                        if (StringUtils.isEmpty(value)) return "此项为必填项！";
                    }
                },
                {display: '股比',name:'stockRatio',width:100},
                {
                    display: '证件类型', name: 'certTypCdNm', minWidth: 60,
                    editor: {
                        type: 'select',
                        data: certTypCdList,
                        valueField: 'key',
                        textField: 'value'
                    },
                    valueField: 'certTypCd',
                    textField: 'certTypCdNm',
                    render: function (item) {
                        return item.certTypCdNm;
                    },
                    validate: function (value, rowData, col) {
                        //if (StringUtils.isEmpty(value) && CollectionUtils.isNotEmpty(mustAddRlPsnJSON) && mustAddRlPsnJSON.indexOf(rowData.rlTypCd) >= 0) return "此项为必填项！";
                        if (StringUtils.isEmpty(value)) return "此项为必填项！";
                    }
                },
                {
                    display: '证件号码',
                    name: 'certNo',
                    width: 140,
                    //align: 'left',
                    editor: {type: 'text'},
                    render: function (value,rowData) {
                        if(StringUtils.isEmpty(value.certNo) && StringUtils.isNotEmpty(value.rlTypCd)){
                            if(noAddRlPsnJSON.indexOf(value.rlTypCd) >= 0){
                                return '<span class="c_gray">(非必填信息)</span>';
                            }else{
                                return '<span class="c_gray">(必填信息)</span>';
                            }
                        }
                        return value.certNo;
                    },
                    validate: function (value, rowData, col) {
                        //if (StringUtils.isEmpty(value) && CollectionUtils.isNotEmpty(mustAddRlPsnJSON) && mustAddRlPsnJSON.indexOf(rowData.rlTypCd) >= 0) return "此项为必填项！";
                        if (StringUtils.isEmpty(value)){
                            if((CollectionUtils.isEmpty(noAddRlPsnJSON)) || (CollectionUtils.isNotEmpty(noAddRlPsnJSON) && noAddRlPsnJSON.indexOf(rowData.rlTypCd) < 0)){
                                return "此项为必填项！";
                            }
                        }
                    }
                },
                {
                    display: '联系电话',
                    name: 'tel',
                    width: 100,
                    //align: 'left',
                    editor: {type: 'text'},
                    render: function (value,rowData) {
                        if(StringUtils.isEmpty(value.tel) && StringUtils.isNotEmpty(value.rlTypCd)){
                            if(noAddRlPsnJSON.indexOf(value.rlTypCd) >= 0){
                                return '<span class="c_gray">(非必填信息)</span>';
                            }else{
                                return '<span class="c_gray">(必填信息)</span>';
                            }
                        }
                        return value.tel;
                    },
                    validate: function (value, rowData, col) {
                        //if (StringUtils.isEmpty(value) && CollectionUtils.isNotEmpty(mustAddRlPsnJSON) && mustAddRlPsnJSON.indexOf(rowData.rlTypCd) >= 0) return "此项为必填项！";
                        if (StringUtils.isEmpty(value)){
                            if((CollectionUtils.isEmpty(noAddRlPsnJSON)) || (CollectionUtils.isNotEmpty(noAddRlPsnJSON) && noAddRlPsnJSON.indexOf(rowData.rlTypCd) < 0)){
                                return "此项为必填项！";
                            }
                        }
                    }
                },
                {display: '备注', name: 'rlRem', minWidth: 140, editor: {type: 'text'}},


                {
                    display: '工商信息校验结果', name: 'busInfoVerify', minWidth: 150,
                    render: function (rowdata, rowindex, value) {
                        if (rowdata.busInfoVerify == 1) {
                            return "一致";
                        } else if (rowdata.busInfoVerify == -1) {
                            return "不一致";
                        } else if (rowdata.busInfoVerify == 0) {
                            return "未查得";
                        } else {
                            return "";
                        }
                    }
                },

                {
                    display: '三要素校验结果1', name: 'pyPerVerify', minWidth: 150,
                    render: function (rowdata, rowindex, value) {
                        if (rowdata.pyPerVerify == 1) {
                            return "一致";
                        } else if (rowdata.pyPerVerify == -1) {
                            return "不一致";
                        } else if (rowdata.pyPerVerify == 0) {
                            return "未查得";
                        } else {
                            return "";
                        }
                    }
                },

                {
                    display: '三要素校验结果2', name: 'tdPerVerify', minWidth: 150,
                    render: function (rowdata, rowindex, value) {
                        if (rowdata.tdPerVerify == 1) {
                            return "一致";
                        } else if (rowdata.tdPerVerify == -1) {
                            return "不一致";
                        } else if (rowdata.tdPerVerify == 0) {
                            return "未查得";
                        } else {
                            return "";
                        }
                    }
                },

                {
                    display: '三要素校验结果3', name: 'brPerVerify', minWidth: 150,
                    render: function (rowdata, rowindex, value) {
                        if (rowdata.brPerVerify == 1) {
                            return "一致";
                        } else if (rowdata.brPerVerify == -1) {
                            return "不一致";
                        } else if (rowdata.brPerVerify == 0) {
                            return "未查得";
                        } else {
                            return "";
                        }
                    }
                },
                getOptColumn()
            ],
            onBeforeSubmitEdit: function (e) {//重新赋值,要不然选中后离开会把key显示在前端
                if (e.selected && e.column.columnname == "certTypCdNm") {
                    e.record.certTypCdId = e.value;
                    e.value = e.selected[e.column.editor.textField];
                    e.record.certTypCd = e.record.certTypCdId;
                }
                if (e.selected && e.column.columnname == "rlTypCdNm") {
                    e.record.rlTypCdId = e.value;
                    e.value = e.selected[e.column.editor.textField];
                    e.record.rlTypCd = e.record.rlTypCdId;
                }
            },
            onBeforeEdit: function (e) {
                e.lastValue = e.value;
                e.index = e.rowindex;
                e.column.editor.readonly = false;
                var colNanme = e.column.columnname;

                if (colNanme == "rlTypCdNm" && e.record.rlTypCdNm != null) {
                     e.column.editor.readonly = true;
                 }
                /* if (e.record.isSysDef == 1) {
                    if (colNanme == "rlTypCdNm") {
                        e.column.editor.readonly = true;
                    }
                } */

            },

            pageSize: 100,
            root: 'rows',
            record: 'total',
            hideLoadButton: true,
            heightDiff: -2,
            checkbox: false,
            enabledEdit: true,
            allowUnSelectRow: true,
            alternatingRow: false,
            rownumbers: true,
            enabledSort: false,
            usePagerOnLessPagesize: false,
            onAfterShowData: function (currentData) {
                this.CACHED_DATA = JSON.parse(JSON.stringify(currentData))
            }
        });
        rlPsnGrid.setHeight(200);
    }

    function initRlPsnCarGrid(data) {
        var _compId = ${lnkCompId};
        var _applyId =
        ${applyId}
        var _audStsCd = 1
        rlPsnGrid = $("#ligergrid_psn").ligerGrid({
            usePager: false,
            url: '<%=path%>/project/prjLnkCompApply/initRlPsnList.do?compId=' + _compId + '&compApplyId=' + _applyId,
            method: 'get',
            columns: [
                {display: '姓名(<span class="c_red">*</span>)', name: 'rlNm', minWidth: 60, editor: {type: 'text'}},
                {
                    display: '联系人类型(<span class="c_red">*</span>)', name: 'rlTypCdNm', minWidth: 60,
                    editor: {
                        type: 'select',
                        data: rlRsnTypListJSON,
                        valueField: 'key',
                        textField: 'value'
                    },
                    valueField: 'rlTypCd',
                    textField: 'rlTypCdNm',
                    render: function (item) {
                        return item.rlTypCdNm;
                    },
                    validate: function (value) {
                        if (value == '' || value == undefined) return "此项为必填项！";
                    }
                },
                {display: '股比',name:'stockRatio',width:100},
                {
                    display: '证件类型(<span class="c_red">*</span>)', name: 'certTypCdNm', minWidth: 60,
                    editor: {
                        type: 'select',
                        data: certTypCdList,
                        valueField: 'key',
                        textField: 'value'
                    },
                    valueField: 'certTypCd',
                    textField: 'certTypCdNm',
                    render: function (item) {
                        return item.certTypCdNm;
                    },
                    validate: function (value) {
                        if (value == '' || value == undefined) return "此项为必填项！";
                    }
                },
                {
                    display: '证件号码(<span class="c_red">*</span>)',
                    name: 'certNo',
                    width: 140,
                    align: 'left',
                    editor: {type: 'text'}
                },
                {
                    display: '联系电话(<span class="c_red">*</span>)',
                    name: 'tel',
                    width: 100,
                    align: 'left',
                    editor: {type: 'text'},
                    validate: function (value) {
                        if (value == '' || value == undefined) return "此项为必填项！";
                    }
                },
                {display: '备注', name: 'rlRem', minWidth: 140, editor: {type: 'text'}},
                {
                    display: '工商信息校验', name: 'checkVerify', minWidth: 150,
                    render: function (rowdata, rowindex, value) {
                        var h = "";
                        if (_audStsCd == 1) {
                            if (rowdata.busInfoVerify == 2 || rowdata.busInfoVerify == null && rowdata.id != null) {
                                //h += "<a  href = "javascript:checkRlPsn('Verify',\''+rowdata.id+'\',\''+rowdata.rlNm+'\',\''+rowdata.certNo+'\',\''+rowdata.tel+'\');" class = "sq-button sq-button-round">验证</a>"

                                h += '<a class="sq-button sq-button-round" href="javascript:checkRlPsn(1,\'' + rowdata.id + '\',' + rowdata.applyRlPsnId + ',\'' + rowdata.rlNm + '\',\'' + rowdata.certNo + '\',\'' + rowdata.tel + '\',\'' + rowdata.rlTypCd + '\');">验证</a>'
                            } else {
                                h += '<div class="sq-button sq-button-round disabled">已校验</div>'
                            }
                            /* if(rowdata.busInfoVerify != 1){
                                h+= '<a class="sq-button sq-button-round" href="javascript:checkRlPsn(1,\''+rowdata.id+'\',\''+rowdata.rlNm+'\',\''+rowdata.certNo+'\',\''+rowdata.tel+'\',\''+rowdata.rlTypCd+'\');">验证</a>'
                            }else{
                                h +='<div class="sq-button sq-button-round disabled">已校验</div>'
                            } */
                        }
                        return h;
                    }
                },
                {
                    display: '工商信息校验结果', name: 'busInfoVerify', minWidth: 150,
                    render: function (rowdata, rowindex, value) {
                        if (rowdata.busInfoVerify == 1) {
                            return "一致";
                        } else if (rowdata.busInfoVerify == -1) {
                            return "不一致";
                        } else if (rowdata.busInfoVerify == 0) {
                            return "未查得";
                        } else {
                            return "";
                        }
                    }
                },
                {
                    display: '三要素校验（机构1）', name: 'PYCheck', minWidth: 150,
                    render: function (rowdata, rowindex, value) {

                        var h = "";
                        if (_audStsCd == 1) {
                            if (rowdata.pyPerVerify == 2 || rowdata.pyPerVerify == null && rowdata.id != null) {
                                //h += "<a  href = "javascript:checkRlPsn('Verify',\''+rowdata.id+'\',\''+rowdata.rlNm+'\',\''+rowdata.certNo+'\',\''+rowdata.tel+'\');" class = "sq-button sq-button-round">验证</a>"

                                h += '<a class="sq-button sq-button-round" href="javascript:checkRlPsn(2,\'' + rowdata.id + '\',' + rowdata.applyRlPsnId + ',\'' + rowdata.rlNm + '\',\'' + rowdata.certNo + '\',\'' + rowdata.tel + '\',\'' + rowdata.rlTypCd + '\');">验证</a>'
                            } else {
                                h += '<div class="sq-button sq-button-round disabled">已校验</div>'
                            }
                            /* if(rowdata.pyPerVerify != 1){
                                h+= '<a class="sq-button sq-button-round" href="javascript:checkRlPsn(2,\''+rowdata.id+'\',\''+rowdata.rlNm+'\',\''+rowdata.certNo+'\',\''+rowdata.tel+'\',\''+rowdata.rlTypCd+'\');">验证</a>'
                            }else{
                                h+='<div class="sq-button sq-button-round disabled">已校验</div>'
                            } */
                        }
                        return h;
                    }
                },
                {
                    display: '三要素校验结果1', name: 'pyPerVerify', minWidth: 150,
                    render: function (rowdata, rowindex, value) {
                        if (rowdata.pyPerVerify == 1) {
                            return "一致";
                        } else if (rowdata.pyPerVerify == -1) {
                            return "不一致";
                        } else if (rowdata.pyPerVerify == 0) {
                            return "未查得";
                        } else {
                            return "";
                        }
                    }
                },
                {
                    display: '三要素校验（机构2）', name: 'TDCheck', minWidth: 150,
                    render: function (rowdata, rowindex, value) {
                        var h = "";
                        if (_audStsCd == 1) {
                            if (rowdata.tdPerVerify == 2 || rowdata.tdPerVerify == null && rowdata.id != null) {
                                //h += "<a  href = "javascript:checkRlPsn('Verify',\''+rowdata.id+'\',\''+rowdata.rlNm+'\',\''+rowdata.certNo+'\',\''+rowdata.tel+'\');" class = "sq-button sq-button-round">验证</a>"

                                h += '<a class="sq-button sq-button-round" href="javascript:checkRlPsn(3,\'' + rowdata.id + '\',' + rowdata.applyRlPsnId + ',\'' + rowdata.rlNm + '\',\'' + rowdata.certNo + '\',\'' + rowdata.tel + '\',\'' + rowdata.rlTypCd + '\');">验证</a>'
                            } else {
                                h += '<div class="sq-button sq-button-round disabled">已校验</div>'
                            }
                            /* if(rowdata.tdPerVerify != 1){
                                h+= '<a class="sq-button sq-button-round" href="javascript:checkRlPsn(3,\''+rowdata.id+'\',\''+rowdata.rlNm+'\',\''+rowdata.certNo+'\',\''+rowdata.tel+'\',\''+rowdata.rlTypCd+'\');">验证</a>'
                            }else{
                                h +='<div class="sq-button sq-button-round disabled">已校验</div>'
                            } */
                        }
                        return h;
                    }
                },
                {
                    display: '三要素校验结果2', name: 'tdPerVerify', minWidth: 150,
                    render: function (rowdata, rowindex, value) {
                        if (rowdata.tdPerVerify == 1) {
                            return "一致";
                        } else if (rowdata.tdPerVerify == -1) {
                            return "不一致";
                        } else if (rowdata.tdPerVerify == 0) {
                            return "未查得";
                        } else {
                            return "";
                        }
                    }
                },
                {
                    display: '三要素校验（机构3）', name: 'BRCheck', minWidth: 150,
                    render: function (rowdata, rowindex, value) {
                        var h = "";
                        if (_audStsCd == 1) {
                            if (rowdata.brPerVerify == 2 || rowdata.brPerVerify == null && rowdata.id != null) {
                                //h += "<a  href = "javascript:checkRlPsn('Verify',\''+rowdata.id+'\',\''+rowdata.rlNm+'\',\''+rowdata.certNo+'\',\''+rowdata.tel+'\');" class = "sq-button sq-button-round">验证</a>"
                                h += '<a class="sq-button sq-button-round" href="javascript:checkRlPsn(4,\'' + rowdata.id + '\',' + rowdata.applyRlPsnId + ',\'' + rowdata.rlNm + '\',\'' + rowdata.certNo + '\',\'' + rowdata.tel + '\',\'' + rowdata.rlTypCd + '\');">验证</a>'
                            } else {
                                h += '<input class="sq-button sq-button-round disabled" type="button" value="已校验" disabled>'
                            }
                            /* if(rowdata.brPerVerify != 1){
                                h+= '<a class="sq-button sq-button-round" href="javascript:checkRlPsn(4,\''+rowdata.id+'\',\''+rowdata.rlNm+'\',\''+rowdata.certNo+'\',\''+rowdata.tel+'\',\''+rowdata.rlTypCd+'\');">验证</a>'
                            }else{
                                h +='<input class="sq-button sq-button-round disabled" type="button" value="已校验" disabled>'
                            } */

                        }
                        return h;
                    }
                },
                {
                    display: '三要素校验结果3', name: 'brPerVerify', minWidth: 150,
                    render: function (rowdata, rowindex, value) {
                        if (rowdata.brPerVerify == 1) {
                            return "一致";
                        } else if (rowdata.brPerVerify == -1) {
                            return "不一致";
                        } else if (rowdata.brPerVerify == 0) {
                            return "未查得";
                        } else {
                            return "";
                        }
                    }
                },
                getOptColumn()
            ],
            onBeforeSubmitEdit: function (e) {//重新赋值,要不然选中后离开会把key显示在前端
                if (e.selected && e.column.columnname == "certTypCdNm") {
                    e.record.certTypCdId = e.value;
                    e.value = e.selected[e.column.editor.textField];
                    e.record.certTypCd = e.record.certTypCdId;
                }
                if (e.selected && e.column.columnname == "rlTypCdNm") {
                    e.record.rlTypCdId = e.value;
                    e.value = e.selected[e.column.editor.textField];
                    e.record.rlTypCd = e.record.rlTypCdId;
                }
            },


            onBeforeEdit: function (e) {
                e.lastValue = e.value;
                e.index = e.rowindex;
                e.column.editor.readonly = false;
                var colNanme = e.column.columnname;
                if (colName == 'rlTypCdNm' && e.record.rlTypCdNm != null) {
                    e.column.editor.readonly = true;
                } else {
                    e.column.editor.readonly = false;
                }
                if (e.record.isSysDef == 1) {
                    if (colNanme == "rlTypCdNm") {
                        e.column.editor.readonly = true;
                    }
                }
            },
            pageSize: 100,
            root: 'rows',
            record: 'total',
            hideLoadButton: true,
            heightDiff: -2,
            checkbox: false,
            enabledEdit: true,
            allowUnSelectRow: true,
            alternatingRow: false,
            rownumbers: true,
            enabledSort: false,
            usePagerOnLessPagesize: false,
        });
        rlPsnGrid.setHeight(200);
    }
    function checkRlPsn(type, dataId, applyPsnId, rlNm, certNo, tel, rlTypCd) {
        var _type;
        var _applyId = '${applyId}';
        if (type == 1) {
            _type = 'verify';
        }
        if (type == 2) {
            _type = 'PY';
        }
        if (type == 3) {
            _type = 'TD';
        }
        if (type == 4) {
            _type = 'BR';
        }
        var _lnkCompId = $("#lnkCompId").val();
        var _url = '<%=path%>/project/prjLnkCompRlPsn/checkRlPsn.do';
        $.ajax({
            type: 'post',
            dataType: 'json',
            data: {
                type: _type,
                dataId: dataId,
                rlNm: rlNm,
                certNo: certNo,
                tel: tel,
                compId: _lnkCompId,
                applyPsnId: applyPsnId,
				applyId:_applyId
            },
            url: _url,
            success: function (msg) {
                if (msg.success == 1) {
                    //alert(msg.info)
                    initRlPsnCarGrid();
                    initRlPsnGrid();
                } else {
                    // $.ligerDialog.SQalert({content:msg.data, SQ_type: "error"});
                    initRlPsnCarGrid();
                    initRlPsnGrid();
                }
            }
        });
    }

    //获取操作列
    function getOptColumn() {
        var column = {
            display: '操作',
            isSort: false,
            width: 150,
            align: 'left',
            render: function (rowdata, rowindex, value) {
                var h = "";
                if (rowdata.isDefault != 1 && rowdata.rlTypCd != 2) {
                    h += '<a class="sq-button-hasicon" href="javascript:removeBtn(';
                    h += "'" + rowdata.id + "'";
                    h += ')"><i class="sqBtnIco_7"></i>删除</a>'
                }
                return h;
            }
        }
        return column;
    }

    function removeBtn() {
        var selectedRows = rlPsnGrid.getSelectedRows();
        if (selectedRows.length != 1) {
            $.ligerDialog.SQalert({content: LogUtils.LOG_CMM_SELECT_ONLY_A_ROW, SQ_type: "warring"});
            return;
        }
        $.ligerDialog.confirm(LogUtils.LOG_CMM_DELETE_CONFIRM, function (flag) {
            if (flag == false) return;
            if (selectedRows[0].id) {
                //删除数据
                var _ids = [];
                for (var index in selectedRows) {
                    _ids.push(selectedRows[index].id);
                }
                $.ajax({
                    type: 'post',
                    dataType: 'json',
                    data: {ids: JSON.stringify(_ids)},
                    url: '<%=path%>/project/prjLnkCompRlPsn/removeByIds.do',
                    success: function (msg) {
                        if (msg.success == 1) {
                            rlPsnGrid.deleteSelectedRow();
                            UIUtils.alertSuccess(msg.info);
                        } else {
                            UIUtils.alertError(msg.info);
                        }
                    }
                });

            } else {
                rlPsnGrid.deleteSelectedRow();
            }
        });
    }

    function addBtn() {
        //添加联系人信息
        var manager = $("#ligergrid_psn").ligerGetGridManager();
        manager.addRow({
            rlNm: '',
            rlTypCd: '',
            certTypCd: '0',
            certTypCdNm: '身份证',
            certNo: '',
            tel: '',
            rlRem: '',
        });
    }


    //对比ligerGrid编辑前后的Data
    //@param gridID <字符串> - ligerGrid id
    //@param fields [数组<字符串>] - 要对比的列的字段
    //@param count <数字>可选 - 参与对比的前几行
    //返回值：<Boolean> 如果对比结果一样，返回true，否者返回false
    //注：grid 加载完(onAfterShowData)后 必须缓存数据到'CACHED_DATA'这个属性上 ！！！
    function compareGridData(gridID, fields, count) {
        var grid = liger.get(gridID),
            cachedData = count ? grid.CACHED_DATA[grid.options.root].slice(0, count) : grid.CACHED_DATA[grid.options.root],
            currentData = count ? grid.getData().slice(0, count) : grid.getData(),
            cachedData_f = _filterData(cachedData),
            currentData_f = _filterData(currentData);
        return JSON.stringify(cachedData_f) === JSON.stringify(currentData_f)

        function _filterData(dataArr) {
            var newData = [];
            $(dataArr).each(function (index, rowData) {
                var newRow = {};
                for (var i = 0; i < fields.length; i++) {
                    var key = fields[i];
                    newRow[key] = rowData[key];
                }
                newData.push(newRow);
            });
            return newData;
        }
    };


    //对比ligerForm编辑前后的值
    //@param formID - <字符串> - ligerForm ID
    //@param fields [数组<字符串>]可选 - 只对比指定的字段
    //返回值：<Boolean> 如果对比结果一样，返回true，否者返回false
    //注：ligerForm 实例化完(onAfterSetFields)后 必须缓存数据到'CACHED_INIT_VALUES'这个属性上 ！！！
    function compareFormValues(formID, fields) {
        var _ligerForm = liger.get(formID),
            _CACHED_INIT_VALUES = _ligerForm.CACHED_INIT_VALUES,
            _CHANGED_VALUES = getFormValues(formID),
            _fields = Object.keys(_CACHED_INIT_VALUES);
        if (!fields) {
            return JSON.stringify(_CACHED_INIT_VALUES) === JSON.stringify(_CHANGED_VALUES)
        }
        // 以下是对比指定字段
        var compareResult = true;
        for (var i = 0; i < fields.length; i++) {
            var key = fields[i],
                _old = _CACHED_INIT_VALUES[key],
                _new = _CHANGED_VALUES[key];
            if (JSON.stringify(_old) != JSON.stringify(_new)) {
                compareResult = false;
                break;
            }
        }
        return compareResult;
    }

    // 获取所有表单元素的值，键值对的格式返回
    //@param fields - [数组<字符串>] - 1: 表单元素的name（id），只返回指定字段
    //@param fields - <字符串>       - 2: ligerForm ID， 返回所有字段的值
    function getFormValues(fields) {
        if (fields && typeof fields === 'string') {
            fields = liger.get(fields).autoEditors.map(function (v) {
                return v.name
            })
        }
        return _filterFields();

        function _filterFields() {
            var newValues = {};
            $(fields).each(function (index, fieldID) {
                var _editor = liger.get(fieldID),
                    _editorValue = _editor ? _editor.getValue() : $('[name=' + fieldID + ']').val();
                newValues[fieldID] = _editorValue;
            });
            return newValues;
        }
    }
	function onChangefile_multi2(e,cfgCd,cfgDtlCd,orgCd) {
		console.log("e == " + JSON.stringify(e));
		var wait_dialog = $.ligerDialog.SQalert({content: LogUtils.LOG_CMM_DATA_LOADING, SQ_type: "waitting"});
		var filePath= _modulePath; //之前无 '/'
		console.log("filePath ==="+filePath);

		var gridRows = propFileCfgGrid.data.rows;
		var count = 1;
		var row ;
		for (var i = 0; i < gridRows.length; i++) {
			if (gridRows[i].cfgDtlCd == cfgDtlCd) {
				row = gridRows[i];
				break;
			}
		}
		for (var i = 0; i < gridRows.length; i++) {
			if (gridRows[i].cfgDtlCd == cfgDtlCd && StringUtils.isNotEmpty(gridRows[i].fileNm)) {
				count ++;
			}
		}
		if (row) {
			if (row.maxNum != 0 && row.maxNum < count) {
				$.ligerDialog.SQalert({content: row.datNm + "最多可上传" + row.maxNum + "份",
					SQ_showButtons: true,SQ_type: "warning",SQ_onBtnclick:function(){console.log(row.datNm + "最多可上传" + row.maxNum + "份")}});
				wait_dialog.close();
				return ;
			}
		} else {
			$.ligerDialog.SQalert({content: "请刷新页面重试!",
				SQ_showButtons: true,SQ_type: "warning",SQ_onBtnclick:function(){console.log("没有获取到行对象[row]")}});
			wait_dialog.close();
			return ;
		}

		$.ajaxFileUpload({
			url: '<%=path%>/system/sysulfilesrec/upload.do',
			secureuri: false,
			fileElementId: e.target.id,  //这里不在是以前的id了，要写成数组的形式！
			dataType: 'json',
			data: {filePath: filePath,costomerPath:_costomerPath,rootPath:_rootPath,uploadSysCd:_uploadSysCd},
			success: function (msg) {
				if (msg.success == 1) {
					//var row = lnkFileInfoCfgGrid.getRow(rowIndex);
					console.log(row);

					var uploadJOSN = JSON.parse(JSON.stringify(msg.data));
					console.log("uploadJOSN =s= " + JSON.stringify(uploadJOSN));
					for (var i=0; i< uploadJOSN.length; i++){
						var oldPath = "";
						oldPath = uploadJOSN[i].filePath;
						if (StringUtils.isEmpty(row.fileNm)) {
							propFileCfgGrid.updateCell("filePath",oldPath,row.__index);
							propFileCfgGrid.updateCell("fileNm",uploadJOSN[i].fileNm,row.__index);
							propFileCfgGrid.updateCell("cfgDtlCd",cfgDtlCd,row.__index);
							propFileCfgGrid.updateCell("crtTm",new Date(),row.__index);
						} else {
							var datNm = row.datNm;
							if (row.isMust == 1) {
								//datNm += '<span class="requiredSymbol">*</span>';
							}
							propFileCfgGrid.addRow({
								audStsCd : 0,
								audStsCdNm : "未验证",
								cfgDtlCd : cfgDtlCd,
								datNm : datNm,
								isMust : row.isMust,
								filePath : oldPath,
								fileNm : uploadJOSN[i].fileNm,
								crtTm : new Date(),
							}, row, false)
						}
						uploadJOSN[i].cfgCd = _cfgCd ;
						uploadJOSN[i].cfgDtlCd = cfgDtlCd;
						uploadJOSN[i].orgCd = _cfgOrgCd;
						uploadJOSN[i].tabNm = _tabNm;
						uploadJOSN[i].sysCd = _cfgSysCd;
						upload_result_params2.push(uploadJOSN[i]);
						console.log("upload_result_params =s= " + JSON.stringify(upload_result_params));
						console.log("file_btn_val => " + $('#fileup_' + cfgCd + '_' + cfgDtlCd).val());
						$('#fileup_' + cfgCd + '_' + cfgDtlCd).val('');
						console.log("file_btn_val => " + $('#fileup_' + cfgCd + '_' + cfgDtlCd).val());
					}
					wait_dialog.close();
				} else {
					wait_dialog.close();
					$.ligerDialog.SQalert({content: msg.info, SQ_type: "error"});
				}
			}
		});
	};



    // 禁用所有表单元素
    //@param fields - [数组<字符串>] - 1: 表单元素的name（id），只返回指定字段
    //@param fields - <字符串>       - 2: ligerForm ID， 返回所有字段的值
    function setDisabledAll(fields) {
        console.log(fields)
        if (fields && typeof fields === 'string') {
            fields = liger.get(fields).autoEditors.map(function (v) {
                return v.name
            })
        }
        return _filterFields();

        function _filterFields() {
            $(fields).each(function (index, fieldID) {
                var _editor = liger.get(fieldID),
                    _$el = $('[name=' + fieldID + ']');
                if (_editor) {
                    _editor.setDisabled()
                } else if (_$el.attr('type') == 'radio') {
                    _$el.setDisabled_ligerRadio(true);
                } else if (_$el[0].tagName == 'TEXTAREA') {
                    _$el.setDisabled_ligerTextarea(true);
                }
            });
        }
    }

    /* function disableFiled() {
        if (liger.get("lnkCompNm")) {
            liger.get("lnkCompNm").setDisabled(true);
        }
        if (liger.get("orgCode")) {
            liger.get("orgCode").setDisabled(true);
        }
        if (liger.get("ownerCd")) {
            liger.get("ownerCd").setDisabled(true);
        }
        if (liger.get("officeAddr")) {
            liger.get("officeAddr").setDisabled(true);
        }
        if (liger.get("majorBiz")) {
            liger.get("majorBiz").setDisabled(true);
        }
        if (liger.get("compTyp")) {
            liger.get("compTyp").setDisabled(true);
        }
        if (liger.get("bizLicNo")) {
            liger.get("bizLicNo").setDisabled(true);
        }
        if (liger.get("regAddr")) {
            liger.get("regAddr").setDisabled(true);
        }
        if (liger.get("regDt")) {
            liger.get("regDt").setDisabled(true);
        }
        if (liger.get("taxRegNo")) {
            liger.get("taxRegNo").setDisabled(true);
        }
        if (liger.get("expDt")) {
            liger.get("expDt").setDisabled(true);
        }
        if (liger.get("bizScope")) {
            liger.get("bizScope").setDisabled(true);
        }
        if (liger.get("corpRep")) {
            liger.get("corpRep").setDisabled(true);
        }
        if (liger.get("idNo")) {
            liger.get("idNo").setDisabled(true);
        }
        if (liger.get("totLnkQty")) {
            liger.get("totLnkQty").setDisabled(true);
        }
        if (liger.get("ownQty")) {
            liger.get("ownQty").setDisabled(true);
        }
        if (liger.get("ourTotLnkQyt")) {
            liger.get("ourTotLnkQyt").setDisabled(true);
        }
        if (liger.get("actCtrlNm")) {
            liger.get("actCtrlNm").setDisabled(true);
        }
        if (liger.get("actCtrlMp")) {
            liger.get("actCtrlMp").setDisabled(true);
        }
        if (liger.get("lnkNm")) {
            liger.get("lnkNm").setDisabled(true);
        }
        if (liger.get("lnkMp")) {
            liger.get("lnkMp").setDisabled(true);
        }
        if (liger.get("lnkPost")) {
            liger.get("lnkPost").setDisabled(true);
        }
        $("#rem").setDisabled_ligerTextarea(true);
    }
 */
</script>
</body>
</html>